Merge pull request #1838 from nickanderson/ENT-13161/master #136
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 dependency tables | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_call: | |
| workflow_dispatch: # Enables manual trigger | |
| jobs: | |
| update_dep_tables: | |
| name: Update dependency tables | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checks-out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: "master" | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| - name: Set Git user | |
| run: | | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| - name: Save commit hash before | |
| run: | | |
| echo "COMMIT_HASH_BEFORE=$(git log -1 --format=%H)">> $GITHUB_ENV | |
| - name: Run deptool | |
| run: python3 scripts/deptool.py --patch | |
| - name: Save commit hash after | |
| run: | | |
| echo "COMMIT_HASH_AFTER=$(git log -1 --format=%H)">> $GITHUB_ENV | |
| - name: Create Pull Request | |
| if: env.COMMIT_HASH_BEFORE != env.COMMIT_HASH_AFTER | |
| uses: cfengine/create-pull-request@v6 | |
| with: | |
| title: Updated Markdown dependency tables | |
| body: Automated updates to the README.md Markdown dependency tables using [the `update_dep_tables` workflow](https://github.com/cfengine/buildscripts/blob/master/.github/workflows/update-dep-tables.yml). | |
| reviewers: | | |
| olehermanse | |
| larsewi | |
| craigcomstock | |
| branch: update-dependency-tables | |
| branch-suffix: timestamp |