Skip to content

Bump Tempo Dependencies #11

Bump Tempo Dependencies

Bump Tempo Dependencies #11

Workflow file for this run

name: Bump Tempo Dependencies
permissions: {}
on:
schedule:
# Run daily at 00:00 UTC
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
bump-tempo:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Bump tempo dependencies
id: bump
env:
GH_TOKEN: ${{ github.token }}
run: ./.github/scripts/bump-tempo.sh
- name: Create Pull Request
if: steps.bump.outputs.updated == 'true'
env:
GH_TOKEN: ${{ github.token }}
LATEST_REV: ${{ steps.bump.outputs.latest_rev }}
CHANGELOG_FILE: ${{ steps.bump.outputs.changelog }}
run: |
BRANCH_NAME="deps/bump-tempo-${LATEST_REV:0:7}"
# Skip if a PR already exists for this branch
EXISTING_PR=$(gh pr list --head "$BRANCH_NAME" --state open --json number --jq '.[0].number')
if [[ -n "$EXISTING_PR" ]]; then
echo "PR #${EXISTING_PR} already exists for ${BRANCH_NAME}, skipping."
exit 0
fi
# Configure git
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Create and push branch (force-push in case a stale branch exists from a prior failed run)
git checkout -b "$BRANCH_NAME"
git add Cargo.toml Cargo.lock
git commit -m "chore(deps): bump tempo dependencies to ${LATEST_REV:0:7}"
git push --force-with-lease origin "$BRANCH_NAME"
# Create PR
gh pr create \
--title "chore(deps): bump tempo dependencies to ${LATEST_REV:0:7}" \
--body-file "$CHANGELOG_FILE" \
--base main \
--head "$BRANCH_NAME"