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

ci: Fix workflow events #52

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:
release_id:
required: false
type: string
ref:
required: true
type: string
secrets:
# The GITHUB_TOKEN name is reserved, but not passed through implicitly.
# So we call our secret parameter simply TOKEN.
Expand Down Expand Up @@ -59,7 +62,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: repo-src
ref: ${{ github.event.pull_request.merge_commit_sha || github.event.push.head }}
ref: ${{ inputs.ref || github.ref }}

- name: Configure Build Matrix
id: configure
Expand Down Expand Up @@ -153,7 +156,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: repo-src
ref: ${{ github.event.pull_request.merge_commit_sha || github.event.push.head }}
ref: ${{ inputs.ref || github.ref }}

- name: Install OS packages
run: ./repo-src/build-scripts/00-packages.sh
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: repo-src
ref: ${{ github.ref }}

- name: Draft release
id: draft_release
Expand All @@ -63,6 +64,7 @@ jobs:
uses: ./.github/workflows/build.yaml
with:
release_id: ${{ needs.draft_release.outputs.release_id }}
ref: ${{ github.ref }}
secrets:
TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -74,6 +76,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: repo-src
ref: ${{ github.ref }}

- name: Publish release
env:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
# old one. If a PR is updated and a new test run is started, the old test run
# will be cancelled automatically to conserve resources.
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.run_id }}
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

# NOTE: Set the repository variable ENABLE_DEBUG to enable debugging via tmate
Expand All @@ -39,3 +39,5 @@ concurrency:
jobs:
build:
uses: ./.github/workflows/build.yaml
with:
ref: refs/pull/${{ github.event.number }}/merge
Loading