📕 Update Readme #52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 📕 Update Readme | |
| on: | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["🏃♂️ Create Runners", "😎 Uber Runner"] | |
| types: [ completed ] | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '.gitea/workflows/scripts/update-readme.py' | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: Docker Hub | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests | |
| - name: Generate Docker Images Table | |
| run: python .gitea/workflows/scripts/update-readme.py | |
| env: | |
| DOCKER_USERNAME: ${{ vars.DOCKERHUB_USERNAME }} | |
| DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} | |
| IMAGE: "${{ vars.DOCKERHUB_USERNAME }}/unity-runner" | |
| - name: Commit changes if README was updated | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add README.md | |
| git pull | |
| git diff --quiet && git diff --staged --quiet || (git commit -m "Update Docker images table in README" && git push) |