Skip to content

Commit 379e4c2

Browse files
committed
ci(monorepo): Update the branch names specified in the workflows
1 parent 2009d4e commit 379e4c2

File tree

7 files changed

+41
-26
lines changed

7 files changed

+41
-26
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ on:
1717
push:
1818
branches:
1919
- main
20-
- next
21-
- experimental
20+
- alpha
21+
- beta
2222
paths-ignore:
2323
- "**/*.md"
2424
- ".all-contributorsrc"

.github/workflows/gitguardian.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
push:
55
branches:
66
- main
7-
- next
8-
- experimental
7+
- alpha
8+
- beta
99
pull_request:
1010
branches:
1111
- "**"

.github/workflows/greetings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
issues:
66
branches:
77
- main
8-
- next
9-
- experimental
8+
- alpha
9+
- beta
1010

1111
permissions: {}
1212

.github/workflows/release.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
push:
1010
branches:
1111
- main
12-
- next
13-
- experimental
12+
- alpha
13+
- beta
1414

1515
env:
1616
CI: true
@@ -19,7 +19,6 @@ env:
1919
GITHUB_ACTOR: ${{ github.actor }}
2020
GITHUB_TOKEN: ${{ github.token }}
2121
NPM_TOKEN: ${{ secrets.STORM_BOT_NPM_TOKEN }}
22-
CARGO_REGISTRY_TOKEN: ${{ secrets.STORM_BOT_CARGO_TOKEN }}
2322

2423
jobs:
2524
start:
@@ -30,8 +29,8 @@ jobs:
3029
id-token: write
3130
if:
3231
github.repository == 'storm-software/monorepo-template' && (github.ref ==
33-
'refs/heads/main' || github.ref == 'refs/heads/next' || github.ref ==
34-
'refs/heads/experimental')
32+
'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref ==
33+
'refs/heads/beta')
3534
steps:
3635
- name: Send notification - Deployment started
3736
uses: storm-software/action-notify@main
@@ -54,7 +53,7 @@ jobs:
5453
discord-webhook: ${{ secrets.STORM_BOT_DISCORD_WEBHOOK}}
5554

5655
process:
57-
name: "Continuous Integration"
56+
name: "Release"
5857
if:
5958
always() && !cancelled() && !contains(needs.*.result, 'failure') &&
6059
github.event.pull_request.draft == false
@@ -65,6 +64,26 @@ jobs:
6564
needs:
6665
- start
6766
steps:
67+
- name: Checkout [Pull Request]
68+
uses: actions/checkout@v4
69+
if: ${{ github.event_name == 'pull_request' }}
70+
with:
71+
# By default, PRs will be checked-out based on the Merge Commit, but we want the actual branch HEAD.
72+
ref: ${{ github.event.pull_request.head.sha }}
73+
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
74+
fetch-depth: 0
75+
token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
76+
persist-credentials: false
77+
78+
- name: Checkout `main` branch
79+
uses: actions/checkout@v4
80+
if: ${{ github.event_name != 'pull_request' }}
81+
with:
82+
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
83+
fetch-depth: 0
84+
token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
85+
persist-credentials: false
86+
6887
- name: Setup workspace
6988
uses: storm-software/action-devenv-setup@main
7089
with:
@@ -79,27 +98,23 @@ jobs:
7998
uses: nrwl/nx-set-shas@v4
8099
with:
81100
main-branch-name: main
82-
workflow-id: ci.yml
101+
workflow-id: release.yml
83102
set-environment-variables-for-job: true
84103
error-on-no-successful-workflow: true
85104

86105
- name: Release repository updates
87106
run:
88-
devenv shell release ${{ steps.setSHAs.outputs.base }} ${{
89-
steps.setSHAs.outputs.head }}
107+
devenv shell release ${{ steps.setSHAs.outputs.base }} ${{ steps.setSHAs.outputs.head }}
90108
env:
91109
NX_BASE: ${{ steps.setSHAs.outputs.base }}
92110
NX_HEAD: ${{ steps.setSHAs.outputs.head }}
93111
GITHUB_ACTOR: ${{ github.actor }}
94112
GITHUB_TOKEN: ${{ github.token }}
95-
GH_TOKEN: ${{ github.token }}
96113
STORM_BOT_GITHUB_TOKEN: ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
97-
NPM_TOKEN: ${{ secrets.STORM_BOT_NPM_TOKEN }}
98-
CARGO_REGISTRY_TOKEN: ${{ secrets.STORM_BOT_CARGO_TOKEN }}
99-
CLOUDFLARE_API_TOKEN: ${{ secrets.STORM_BOT_CLOUDFLARE_TOKEN }}
100-
STORM_BOT: stormie-bot
101114
STORM_WORKSPACE_ROOT: ${{ github.workspace }}
102115
STORM_REPOSITORY: ${{ github.repositoryUrl }}
116+
NPM_TOKEN: ${{ secrets.STORM_BOT_NPM_TOKEN }}
117+
CLOUDFLARE_API_TOKEN: ${{ secrets.STORM_BOT_CLOUDFLARE_TOKEN }}
103118
TAG: ${{ inputs.tag }}
104119

105120
success:

.github/workflows/security.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
push:
66
branches:
77
- main
8-
- next
9-
- experimental
8+
- alpha
9+
- beta
1010
paths-ignore:
1111
- "**/*.md"
1212
- ".all-contributorsrc"

.github/workflows/sync-labels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
push:
66
branches:
77
- main
8-
- next
9-
- experimental
8+
- alpha
9+
- beta
1010
paths:
1111
- .github/labels.yml
1212

.github/workflows/zizmor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
push:
55
branches:
66
- main
7-
- next
8-
- experimental
7+
- alpha
8+
- beta
99
pull_request:
1010
branches:
1111
- "**"

0 commit comments

Comments
 (0)