Add minor GHA improvements

See https://github.com/docker-library/bashbrew/pull/77
This commit is contained in:
Tianon Gravi 2023-07-18 13:27:20 -07:00
parent e1f689e636
commit e8e80fca61
1 changed files with 12 additions and 2 deletions

View File

@ -3,6 +3,7 @@ name: GitHub CI
on:
pull_request:
push:
workflow_dispatch:
schedule:
- cron: 0 0 * * 0
@ -10,6 +11,10 @@ defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
generate-jobs:
@ -24,10 +29,15 @@ jobs:
name: Generate Jobs
run: |
strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")"
strategy="$("$BASHBREW_SCRIPTS/github-actions/munge-i386.sh" -c <<<"$strategy")"
strategy="$(jq -c '.matrix.include |= [ .[] | select(.name | (test("i386") | not) or test("alpine")) ]' <<<"$strategy")" # Ubuntu no longer supports i386 (so we can only build test Alpine there; qemu-user-static is too slow for other arches)
echo "strategy=$strategy" >> "$GITHUB_OUTPUT"
jq . <<<"$strategy" # sanity check / debugging aid
EOF="EOF-$RANDOM-$RANDOM-$RANDOM"
echo "strategy<<$EOF" >> "$GITHUB_OUTPUT"
jq <<<"$strategy" . | tee -a "$GITHUB_OUTPUT"
echo "$EOF" >> "$GITHUB_OUTPUT"
test:
needs: generate-jobs