forked from Conjure-Tools/unity-runner
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: Update README with Docker Images
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *' # Run daily at midnight
|
|
workflow_dispatch: # Allow manual triggering
|
|
workflow_run: # Trigger from images
|
|
types: [completed]
|
|
push:
|
|
paths:
|
|
- .gitea/workflows/update-readme.yaml
|
|
- .gitea/workflows/scripts/update-readme.py
|
|
|
|
jobs:
|
|
update-readme:
|
|
runs-on: ubuntu-latest
|
|
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_REGISTRY: docker.lakes.house
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
IMAGE: unityci/editor
|
|
|
|
- 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) |