Skip to content

Commit 3a0fd1f

Browse files
committed
Update GHA YAML with bashbrew example improvements (esp. concurrency:)
1 parent 020b04e commit 3a0fd1f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@ name: GitHub CI
33
on:
44
pull_request:
55
push:
6+
workflow_dispatch:
67
schedule:
78
- cron: 0 0 * * 0
89

910
defaults:
1011
run:
1112
shell: 'bash -Eeuo pipefail -x {0}'
1213

14+
concurrency:
15+
group: ${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: read
20+
1321
jobs:
1422

1523
generate-jobs:
@@ -26,8 +34,11 @@ jobs:
2634
strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")"
2735
strategy="$(.github/workflows/munge.sh -c <<<"$strategy")"
2836
strategy="$("$BASHBREW_SCRIPTS/github-actions/munge-i386.sh" -c <<<"$strategy")"
29-
echo "strategy=$strategy" >> "$GITHUB_OUTPUT"
30-
jq . <<<"$strategy" # sanity check / debugging aid
37+
38+
EOF="EOF-$RANDOM-$RANDOM-$RANDOM"
39+
echo "strategy<<$EOF" >> "$GITHUB_OUTPUT"
40+
jq <<<"$strategy" . | tee -a "$GITHUB_OUTPUT"
41+
echo "$EOF" >> "$GITHUB_OUTPUT"
3142
3243
test:
3344
needs: generate-jobs

0 commit comments

Comments
 (0)