Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add several improvements to GHA example #77

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions scripts/github-actions/example-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,8 +29,11 @@ jobs:
name: Generate Jobs
run: |
strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")"
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