-
Notifications
You must be signed in to change notification settings - Fork 335
77 lines (67 loc) · 2.43 KB
/
update-mainnet-revisions.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Update IC versions file
on:
schedule:
- cron: "10 * * * *"
workflow_dispatch:
jobs:
create-token:
runs-on: ubuntu-latest
outputs:
token: ${{ steps.token.outputs.token }}
steps:
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }}
private-key: ${{ secrets.PR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY }}
- id: token
name: Writing token to job output
shell: bash
run: |
set -euo pipefail
echo "token=${{ needs.create-token.outputs.token }}" >> $GITHUB_OUTPUT
update-ic-versions-file:
runs-on: ubuntu-latest
needs: create-token
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ needs.create-token.outputs.token }}
- name: Update IC versions file
env:
GH_TOKEN: ${{ needs.create-token.outputs.token }}
run: |
set -eEuxo pipefail
time python ci/src/revisions/mainnet_revisions.py
shell: bash
update-nervous-system-wasms:
needs: create-token
runs-on:
labels: dind-small
container:
image: ghcr.io/dfinity/ic-build@sha256:4fd13b47285e783c3a6f35aadd9559d097c0de162a1cf221ead66ab1598d5d45
options: >-
-e NODE_NAME --privileged --cgroupns host -v /cache:/cache -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp -v /ceph-s3-info:/ceph-s3-info
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ needs.create-token.outputs.token }}
- name: Update Mainnet canisters file
env:
GH_TOKEN: ${{ needs.create-token.outputs.token }}
run: |
set -eEuxo pipefail
REPO_ROOT=$(git rev-parse --show-toplevel)
BRANCH="ic-nervous-system-wasms"
FILE="mainnet-canisters.json"
# Cache the git_lib.py so it doesn't change between branch changes
cp ci/src/revisions/git_lib.py /tmp/git_lib.py
python /tmp/git_lib.py --repo-root $REPO_ROOT sync-and-checkout --branch $BRANCH --main-branch master
bazel run //rs/nervous_system/tools/sync-with-released-nervous-system-wasms
python /tmp/git_lib.py --repo-root $REPO_ROOT commit-and-create-pr --branch $BRANCH --file $FILE
shell: bash