Skip to content

Commit

Permalink
Add fallback for no-*sums file
Browse files Browse the repository at this point in the history
  • Loading branch information
arenekosreal committed Jan 28, 2025
1 parent 083dd49 commit 98dd418
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,15 @@ jobs:
- name: Generate cache key
id: cache-key
run: |
sum="$(grep -oP '^.+sums' "${{ matrix.package }}/PKGBUILD")"
(
source "${{ matrix.package }}/PKGBUILD"
eval echo \${$sum[@]} | sha256sum
) | sha256sum | awk '{print "key=" $1}' >> "$GITHUB_OUTPUT"
if sum="$(grep -oP '^.+sums' "${{ matrix.package }}/PKGBUILD")"
then
(
source "${{ matrix.package }}/PKGBUILD"
eval echo \${$sum[@]} | sha256sum
) | sha256sum | awk '{print "key=" $1}' >> "$GITHUB_OUTPUT"
else
sha256sum "${{ matrix.package }}/PKGBUILD" | awk '{print "key=" $1}' >> "$GITHUB_OUTPUT"
fi
- name: Setup cache
id: cache
Expand Down

0 comments on commit 98dd418

Please sign in to comment.