Skip to content

Commit

Permalink
Add minor GHA improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Jul 18, 2023
1 parent e1f689e commit e8e80fc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ name: GitHub CI
on:
pull_request:
push:
workflow_dispatch:
schedule:
- cron: 0 0 * * 0

defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:

generate-jobs:
Expand All @@ -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
Expand Down

0 comments on commit e8e80fc

Please sign in to comment.