Skip to content

Commit 31b0fae

Browse files
authored
Update to infrastructure v2 (#28)
* ci.yml: Update to infra v2 * Update workflow references to v2
1 parent 67eaf55 commit 31b0fae

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
cd:
1212
name: CD
13-
uses: access-nri/build-cd/.github/workflows/cd.yml@main
13+
uses: access-nri/build-cd/.github/workflows/cd.yml@v2
1414
with:
1515
model: ${{ vars.NAME }}
1616
permissions:

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,25 @@ jobs:
2121
name: CI
2222
# This job is responsible for checks and prerelease deployments
2323
# that happen when a PR is modified or opened
24-
if: github.event_name == 'pull_request' && github.event.action != 'closed'
25-
uses: access-nri/build-cd/.github/workflows/ci.yml@main
24+
if: >-
25+
(github.event_name == 'pull_request' && github.event.action != 'closed') ||
26+
(github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '!redeploy'))
27+
uses: access-nri/build-cd/.github/workflows/ci.yml@v2
2628
with:
2729
model: ${{ vars.NAME }}
30+
pr: ${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.event.issue.number }}
2831
permissions:
2932
pull-requests: write
3033
contents: write
34+
statuses: write
3135
secrets: inherit # inherit GitHub Deployment Environment secrets
3236

3337
pr-comment:
3438
name: Comment
3539
# This job is responsible for handling Command Comments like
3640
# `!bump` during an open PR
3741
if: github.event_name == 'issue_comment'
38-
uses: access-nri/build-cd/.github/workflows/ci-comment.yml@main
42+
uses: access-nri/build-cd/.github/workflows/ci-comment.yml@v2
3943
with:
4044
model: ${{ vars.NAME }}
4145
permissions:
@@ -48,7 +52,7 @@ jobs:
4852
# This job is responsible for cleaning up the Prereleases after a
4953
# PR is closed
5054
if: github.event_name == 'pull_request' && github.event.action == 'closed'
51-
uses: access-nri/build-cd/.github/workflows/ci-closed.yml@main
55+
uses: access-nri/build-cd/.github/workflows/ci-closed.yml@v2
5256
with:
5357
model: ${{ vars.NAME }}
5458
secrets: inherit # inherit GitHub Deployment environment secrets

0 commit comments

Comments
 (0)