forked from Conjure-Tools/unity-runner
GitHub: Added update-readme
This commit is contained in:
parent
9c3596f715
commit
596ca7df30
45
.github/workflows/update-readme.yaml
vendored
Normal file
45
.github/workflows/update-readme.yaml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: Update README with Docker Images
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # Allow manual triggering
|
||||||
|
workflow_run: # Trigger from images
|
||||||
|
workflows: ["Create Images"]
|
||||||
|
types: [completed]
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- .github/workflows/update-readme.yaml
|
||||||
|
- .gitea/workflows/scripts/update-readme.py
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-readme:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: Docker Hub
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- 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 --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
git add README.md
|
||||||
|
git diff --quiet && git diff --staged --quiet || (git commit -m "Update Docker images table in README" && git push)
|
||||||
Loading…
x
Reference in New Issue
Block a user