Skip to content

Update IC versions file #45

Update IC versions file

Update IC versions file #45

name: Update IC versions file
on:
schedule:
- cron: "10 * * * *"
workflow_dispatch:
jobs:
create-token:
runs-on: ubuntu-latest
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