Update Contributors #2202
Workflow file for this run
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 Contributors # Refresh contrib.rocks image cache | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| refresh-contrib-cache: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Bump cacheBust in README | |
| run: | | |
| set -euo pipefail | |
| TS=$(date +%s) | |
| if grep -q 'cacheBust=' README.md; then | |
| sed -i "s/cacheBust=[0-9]\+/cacheBust=${TS}/g" README.md | |
| else | |
| echo "cacheBust parameter not found in README.md" >&2 | |
| exit 1 | |
| fi | |
| - name: Detect changes | |
| id: changes | |
| run: | | |
| if git diff --quiet; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.changes.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore: refresh contrib.rocks image cache [skip ci]" | |
| committer: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" | |
| branch: refresh-contrib-cache | |
| delete-branch: true | |
| title: "Refresh contrib.rocks image cache" | |
| body: | | |
| Automated refresh of the contrib.rocks image cache by bumping the cacheBust parameter in README.md. | |
| base: main |