Skip to content

Commit

Permalink
ci: Setup this job to use reusable workflows to force the order of fl…
Browse files Browse the repository at this point in the history
…ow (#52)
  • Loading branch information
riweston authored Feb 20, 2025
1 parent 4beca1b commit 424472c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/cd.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
name: "Continuous Deployment: Release"

on:
workflow_run:
workflows: ["Pull Request Tag Creation"]
branches:
- main
types:
- completed
pull_request:
types: [closed]

# Allow a subsequently queued workflow run to interrupt a previous run
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
tag:
uses: ./.github/workflows/cd.tag.yml
goreleaser:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: tag
name: "CD: Release"
runs-on: ubuntu-latest
permissions:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/cd.tag.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
---
name: Pull Request Tag Creation
on:
pull_request:
types: [closed]

# Allow a subsequently queued workflow run to interrupt a previous run
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
workflow_call:

jobs:
tag:
Expand Down

0 comments on commit 424472c

Please sign in to comment.