Skip to content

Bump Deps (nightly) #30

Bump Deps (nightly)

Bump Deps (nightly) #30

Workflow file for this run

# Copyright 2026 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: Bump Deps (nightly)
on:
workflow_dispatch:
inputs:
branch-name:
type: string
description: "Branch name override (default: bump-deps/YYYY-MM-DD)"
schedule:
# Weekdays at 12:00 UTC (04:00 PST / 05:00 PDT)
- cron: "0 12 * * 1-5"
permissions:
contents: write
pull-requests: write
jobs:
check-for-existing-branch:
# Only run scheduled workflows on the main repo, not forks.
if: github.repository == 'iree-org/fusilli' || github.event_name != 'schedule'
runs-on: ubuntu-24.04
outputs:
branch-exists: ${{ steps.check-exists.outputs.branch-exists }}
branch-name: ${{ steps.resolve-name.outputs.branch-name }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Resolve branch name
id: resolve-name
run: |
if [[ -n "${{ inputs.branch-name }}" ]]; then
BRANCH_NAME="${{ inputs.branch-name }}"
else
BRANCH_NAME="bump-deps/$(date -u +%Y-%m-%d)"
fi
echo "branch-name=${BRANCH_NAME}" >> "${GITHUB_OUTPUT}"
- name: Check for existing bump branch
id: check-exists
run: |
BRANCH_NAME="${{ steps.resolve-name.outputs.branch-name }}"
BRANCH_EXISTS=$(git ls-remote --heads origin "${BRANCH_NAME}" | wc -l)
echo "branch-exists=${BRANCH_EXISTS}" >> "${GITHUB_OUTPUT}"
if [[ ${BRANCH_EXISTS} == 1 ]]; then
echo "Skipping: branch \`${BRANCH_NAME}\` already exists." \
>> "${GITHUB_STEP_SUMMARY}"
fi
bump-deps:
needs: check-for-existing-branch
if: needs.check-for-existing-branch.outputs.branch-exists == '0'
runs-on: ubuntu-24.04
env:
GIT_BRANCH_NAME: ${{ needs.check-for-existing-branch.outputs.branch-name }}
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
# Runs version discovery and updates version.json. Sets CURRENT_*
# and LATEST_* environment variables via GITHUB_ENV.
- name: Bump dependency versions
run: python3 build_tools/scripts/bump_deps.py
env:
GH_TOKEN: ${{ github.token }}
- name: Generate GitHub App token
if: |
env.CURRENT_IREE_VERSION != env.LATEST_IREE_VERSION ||
env.CURRENT_THEROCK_VERSION != env.LATEST_THEROCK_VERSION
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: generate-token
with:
app-id: ${{ secrets.CREATE_PULL_REQUEST_TOKEN_APP_ID }}
private-key: ${{ secrets.CREATE_PULL_REQUEST_TOKEN_APP_PRIVATE_KEY }}
- name: Create pull request
if: |
env.CURRENT_IREE_VERSION != env.LATEST_IREE_VERSION ||
env.CURRENT_THEROCK_VERSION != env.LATEST_THEROCK_VERSION
id: cpr
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ steps.generate-token.outputs.token || github.token }}
base: main
branch: ${{ env.GIT_BRANCH_NAME }}
author: "iree-pr-automator[bot] <iree-github-actions-bot@google.com>"
committer: "iree-pr-automator[bot] <iree-github-actions-bot@google.com>"
signoff: true
delete-branch: true
title: "Bump IREE to `${{ env.LATEST_IREE_VERSION }}`, TheRock to `${{ env.LATEST_THEROCK_VERSION }}`"
commit-message: |
Bump IREE to `${{ env.LATEST_IREE_VERSION }}`, TheRock to `${{ env.LATEST_THEROCK_VERSION }}`
IREE: ${{ env.CURRENT_IREE_VERSION }} -> ${{ env.LATEST_IREE_VERSION }}
TheRock: ${{ env.CURRENT_THEROCK_VERSION }} -> ${{ env.LATEST_THEROCK_VERSION }}
body: |
## Summary
Automated nightly dependency version bump.
| Dependency | Old | New |
|------------|-----|-----|
| IREE | `${{ env.CURRENT_IREE_VERSION }}` | `${{ env.LATEST_IREE_VERSION }}` |
| TheRock | `${{ env.CURRENT_THEROCK_VERSION }}` | `${{ env.LATEST_THEROCK_VERSION }}` |
**IREE changelog**: https://github.com/iree-org/iree/compare/iree-${{ env.CURRENT_IREE_VERSION }}...iree-${{ env.LATEST_IREE_VERSION }}
Auto-generated by [`bump-deps.yml`](https://github.com/${{ github.repository }}/blob/main/.github/workflows/bump-deps.yml).
- name: Write summary
if: steps.cpr.outputs.pull-request-number
run: |
echo "### Dependency Bump PR Created" >> "${GITHUB_STEP_SUMMARY}"
echo "" >> "${GITHUB_STEP_SUMMARY}"
echo "PR: ${{ steps.cpr.outputs.pull-request-url }}" >> "${GITHUB_STEP_SUMMARY}"
echo "" >> "${GITHUB_STEP_SUMMARY}"
echo "| Dependency | Old | New |" >> "${GITHUB_STEP_SUMMARY}"
echo "|------------|-----|-----|" >> "${GITHUB_STEP_SUMMARY}"
echo "| IREE | \`${CURRENT_IREE_VERSION}\` | \`${LATEST_IREE_VERSION}\` |" >> "${GITHUB_STEP_SUMMARY}"
echo "| TheRock | \`${CURRENT_THEROCK_VERSION}\` | \`${LATEST_THEROCK_VERSION}\` |" >> "${GITHUB_STEP_SUMMARY}"