Auto update container documentation #1
Workflow file for this run
This file contains 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: Auto update container documentation | |
on: | |
pull_request: | |
paths: | |
- 'docker/compose.yaml' | |
workflow_dispatch: | |
jobs: | |
auto-update-container-documentation: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Install git | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: git | |
- name: make update_container_documentation | |
id: update-container-documentation | |
run: | | |
make update_container_documentation | |
C=$(git diff -G'^\| ' documentation/Docker-container-profiles.md) | |
echo "$C" | |
if [ -z "$C" ]; then | |
echo "changed=false" >> "$GITHUB_OUTPUT" | |
else | |
echo "changed=true" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Add commit to PR | |
if: steps.update-container-documentation.outputs.changed == 'true' | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: 🤖 Updated Docker-container-profiles.md after compose change by ${{ github.actor }} |