Skip to content

chore(deps): update stefanzweifel/git-auto-commit-action action to v7.2.0 #195

chore(deps): update stefanzweifel/git-auto-commit-action action to v7.2.0

chore(deps): update stefanzweifel/git-auto-commit-action action to v7.2.0 #195

Workflow file for this run

name: updpkgsums
on:
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- master
jobs:
updpkgsums:
runs-on: ubuntu-latest
permissions:
# In order to make sure that the git-auto-commit-action has the permissions to write to the repository
# using the $GITHUB_TOKEN, we have to add the write permissions to it.
contents: write
pull-requests: write
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Find updated package
run: |
#!/usr/bin/env bash
set -euxo pipefail
echo "pkgbuild=$(git diff --name-only origin/master origin/${GITHUB_HEAD_REF} "*PKGBUILD" | head -1 | xargs dirname)" >> $GITHUB_ENV
- name: Validate package
if: ${{ env.pkgbuild != '' }}
uses: ./.github/actions/aur
with:
action: 'updpkgsums'
pkgname: ${{ env.pkgbuild }}
- name: Commit
if: ${{ env.pkgbuild != '' }}
id: commit
uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
with:
file_pattern: '*/PKGBUILD */.SRCINFO'
commit_message: 'chore: update sha256sums and .SRCINFO'
- name: Fail if checksums were updated
if: ${{ steps.commit.outputs.changes_detected == 'true' }}
run: |
gh pr comment ${{ github.event.pull_request.number }} \
--body "I've updated the checksums in this PR. Please **close and reopen** the PR to re-trigger CI workflows."
echo "::error::Checksums were out of date and have been updated. Please close and reopen this PR to re-trigger CI."
exit 1