Skip to content

Commit 7e4f5c1

Browse files
authored
[no ci] Infra Update v7: !update-configs Comment Command (#145)
* [no ci] infra: Update to v7 * Update auto-configs-pr.json with @anton-seaice feedback * [no ci] Updated schema versions and inputs * [no ci] Add custom root-sbd for ESM1.6
1 parent eb9ea79 commit 7e4f5c1

4 files changed

Lines changed: 86 additions & 22 deletions

File tree

.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@v6
13+
uses: access-nri/build-cd/.github/workflows/cd.yml@v7
1414
with:
1515
model: ${{ vars.NAME }}
1616
root-sbd: access-esm1p6

.github/workflows/ci-command.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Command
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
- edited
7+
jobs:
8+
redeploy:
9+
name: Redeploy
10+
if: startsWith(github.event.comment.body, '!redeploy') && github.event.issue.pull_request
11+
uses: access-nri/build-cd/.github/workflows/ci.yml@v7
12+
with:
13+
model: ${{ vars.NAME }}
14+
pr: ${{ github.event.issue.number }}
15+
spack-manifest-schema-version: 1-0-7
16+
config-versions-schema-version: 3-0-0
17+
config-packages-schema-version: 1-0-0
18+
root-sbd: access-esm1p6
19+
permissions:
20+
pull-requests: write
21+
contents: write
22+
statuses: write
23+
secrets: inherit
24+
bump:
25+
name: Bump
26+
if: startsWith(github.event.comment.body, '!bump') && github.event.issue.pull_request
27+
uses: access-nri/build-cd/.github/workflows/ci-comment.yml@v7
28+
with:
29+
model: ${{ vars.NAME }}
30+
root-sbd: access-esm1p6
31+
permissions:
32+
pull-requests: write
33+
contents: write
34+
secrets: inherit
35+
configs:
36+
name: Configs
37+
if: startsWith(github.event.comment.body, '!update-configs') && github.event.issue.pull_request
38+
uses: access-nri/build-cd/.github/workflows/ci-command-configs.yml@v7
39+
with:
40+
model: ${{ vars.NAME }}
41+
auto-configs-pr-schema-version: 1-0-0
42+
root-sbd: access-esm1p6
43+
permissions:
44+
pull-requests: write
45+
secrets:
46+
configs-repo-token: ${{ secrets.CONFIGS_REPO_TOKEN }}
47+
commit-gpg-private-key: ${{ secrets.GH_ACTIONS_BOT_GPG_PRIVATE_KEY }}
48+
commit-gpg-passphrase: ${{ secrets.GH_ACTIONS_BOT_GPG_PASSPHRASE }}

.github/workflows/ci.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,15 @@ on:
1616
paths:
1717
- config/**
1818
- spack.yaml
19-
issue_comment:
20-
types:
21-
- created
22-
- edited
2319
jobs:
2420
pr-ci:
2521
name: CI
26-
if: >-
27-
(github.event_name == 'pull_request' && github.event.action != 'closed') || (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '!redeploy'))
28-
uses: access-nri/build-cd/.github/workflows/ci.yml@v6
22+
if: github.event.action != 'closed'
23+
uses: access-nri/build-cd/.github/workflows/ci.yml@v7
2924
with:
3025
model: ${{ vars.NAME }}
3126
root-sbd: access-esm1p6
32-
pr: ${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.event.issue.number }}
27+
pr: ${{ github.event.pull_request.number }}
3328
spack-manifest-schema-version: 1-0-7
3429
config-versions-schema-version: 3-0-0
3530
config-packages-schema-version: 1-0-0
@@ -38,21 +33,10 @@ jobs:
3833
contents: write
3934
statuses: write
4035
secrets: inherit
41-
pr-comment:
42-
name: Comment
43-
if: github.event_name == 'issue_comment'
44-
uses: access-nri/build-cd/.github/workflows/ci-comment.yml@v6
45-
with:
46-
model: ${{ vars.NAME }}
47-
root-sbd: access-esm1p6
48-
permissions:
49-
pull-requests: write
50-
contents: write
51-
secrets: inherit
5236
pr-closed:
5337
name: Closed
54-
if: github.event_name == 'pull_request' && github.event.action == 'closed'
55-
uses: access-nri/build-cd/.github/workflows/ci-closed.yml@v6
38+
if: github.event.action == 'closed'
39+
uses: access-nri/build-cd/.github/workflows/ci-closed.yml@v7
5640
with:
5741
root-sbd: access-esm1p6
5842
secrets: inherit

config/auto-configs-pr.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/ACCESS-NRI/schema/main/au.org.access-nri/model/deployment/config/auto-configs-pr/1-0-0.json",
3+
"profiles": {
4+
5+
"default": {
6+
"configs_repo": "ACCESS-NRI/access-esm1.6-configs",
7+
"configs": {
8+
"dev-preindustrial+concentrations": {
9+
"checks": {
10+
"repro": true
11+
}
12+
},
13+
"dev-4xCO2+concentrations": {
14+
"checks": {
15+
"repro": true
16+
}
17+
},
18+
"dev-1pctCO2": {
19+
"checks": {
20+
"repro": true
21+
}
22+
},
23+
"dev-historical+concentrations": {
24+
"checks": {
25+
"repro": true
26+
}
27+
}
28+
}
29+
}
30+
31+
}
32+
}

0 commit comments

Comments
 (0)