Skip to content

Commit

Permalink
Update GHA YAML with bashbrew example improvements (esp. concurrency:)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Dec 19, 2023
1 parent 020b04e commit 3a0fd1f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@ 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

permissions:
contents: read

jobs:

generate-jobs:
Expand All @@ -26,8 +34,11 @@ jobs:
strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")"
strategy="$(.github/workflows/munge.sh -c <<<"$strategy")"
strategy="$("$BASHBREW_SCRIPTS/github-actions/munge-i386.sh" -c <<<"$strategy")"
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 3a0fd1f

Please sign in to comment.