Skip to content

Update README.template.md #4

Update README.template.md

Update README.template.md #4

Workflow file for this run

name: Update README with docker-compose.yml
on:
push:
branches:
- main
paths:
- 'docker-compose.yml'
- '.github/workflows/template/README.template.md'
jobs:
update-readme:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Generate README from template
run: |
export DOCKER_COMPOSE=$(cat docker-compose.yml)
envsubst < .github/workflows/template/README.template.md > README.md
- name: Check if there are changes
id: verify-changed-files
run: |
if git diff --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.verify-changed-files.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "docs: update README with docker-compose.yml contents"
git push