Skip to content

Update dependencies #126

Update dependencies

Update dependencies #126

name: Update dependencies
on:
workflow_dispatch:
schedule:
- cron: "30 1 * * Mon"
jobs:
update:
runs-on: ubuntu-20.04
container: ghcr.io/dfinity/dre/actions-runner:3dd4f38f076cad73fdcc68ad37fd29bed4fa3e4d
steps:
- uses: actions/checkout@v4
- name: "🔧 Setup runner"
uses: ./.github/workflows/manage-runner-pre
########################################
# Once per night, update dependencies and completely delete and recreate bazel cache
########################################
- name: "⚒️ Run autoupdate for ic-deps"
run: |
rye sync
rye run python3 scripts/auto-update-revisions.py
- name: "⚒️ Completely delete bazel cache and then recreate it"
run: |
# https://github.com/rustls/rustls/issues/1967#issuecomment-2279067420
sudo apt remove gcc-9 -y
sudo apt install clang -y
cargo install cargo-upgrades
cargo install cargo-edit
cargo upgrade --recursive
# Install taplo cli
TAPLO=taplo-linux-x86_64
curl -L "https://github.com/tamasfe/taplo/releases/latest/download/$TAPLO.gz" -O
gunzip $TAPLO.gz
chmod +x ./$TAPLO
OTEL_VER=$(./$TAPLO get -f Cargo.lock -o json | jq '.package[] | select(.name == "axum-otel-metrics")'| grep -oP '"opentelemetry\s\K[\d.]+' || echo "")
if [[ -n "$OTEL_VER" ]]; then
cargo upgrade --package opentelemetry@$OTEL_VER
fi
rm ./$TAPLO
# Reinstall gcc
sudo apt install gcc -y
CARGO_BAZEL_REPIN=true bazel query >/dev/null
./bin/release-controller-update-data-model.sh
- name: "🆕 Create a new Pull Request with the changes"
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore: Update dependencies"
branch: bot-update-deps
title: "chore: Update dependencies"
body: "This PR updates Python, Rust crates, and IC repository dependencies"
token: ${{ secrets.GIX_CREATE_PR_PAT }}
- name: "🪓 Tear down runner"
uses: ./.github/workflows/manage-runner-post