Add weekly cron job to update cargo rbmt to latest release
What changed, and why it matters
This commit adds a scheduled GitHub Actions workflow that runs once a week to check for new releases of an internal maintainer tool (cargo-rbmt). If a newer release exists, it automatically opens a pull request updating a version-tracking file. There is no user-facing code change, no bug fix, and no security-sensitive behavior introduced.
No security action required. Review the workflow as normal CI/infrastructure maintenance if desired.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The new workflow .github/workflows/cron-weekly-update-rbmt.yml clones the rust-bitcoin-maintainer-tools repository, finds the latest cargo-rbmt-* tag, compares its commit hash to the current value in rbmt-version, and if different writes the new hash and opens a PR via peter-evans/create-pull-request. It uses a repository secret APOELSTRA_CREATE_PR_TOKEN for PR creation and grants contents: write and pull-requests: write permissions only to the job. The workflow is purely an automation convenience for dependency/version tracking.
Changed components
.github/workflows/cron-weekly-update-rbmt.ymlInspect captured patch +46 / −0
diff --git a/.github/workflows/cron-weekly-update-rbmt.yml b/.github/workflows/cron-weekly-update-rbmt.yml
new file mode 100644
index 00000000..16ec2b12
--- /dev/null
+++ b/.github/workflows/cron-weekly-update-rbmt.yml
@@ -0,0 +1,46 @@
+name: Update Rust Bitcoin Maintainer Tools
+on:
+ schedule:
+ - cron: "10 0 * * 6" # Saturday at 00:10
+ workflow_dispatch: # allows manual triggering
+permissions: {}
+jobs:
+ format:
+ name: Update cargo rbmt
+ runs-on: ubuntu-24.04
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+ - name: Update cargo-rbmt version to latest release
+ run: |
+ set -euo pipefail
+ git clone --filter=blob:none --no-checkout \
+ https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git /tmp/rbmt
+ LATEST_TAG=$(git -C /tmp/rbmt tag --sort=-version:refname | grep '^cargo-rbmt-' | head -1)
+ LATEST_HASH=$(git -C /tmp/rbmt rev-parse "${LATEST_TAG}^{}")
+ CURRENT_HASH=$(cat rbmt-version)
+ if [ -n "${LATEST_HASH}" ] && [ "${LATEST_HASH}" != "${CURRENT_HASH}" ]; then
+ echo "${LATEST_HASH}" > rbmt-version
+ echo "rbmt_hash=${LATEST_HASH}" >> "${GITHUB_ENV}"
+ echo "rbmt_semver=${LATEST_TAG#cargo-rbmt-}" >> "${GITHUB_ENV}"
+ echo "changes_made=true" >> "${GITHUB_ENV}"
+ else
+ echo "rbmt-version is already at the latest release. Not opening any PR."
+ echo "changes_made=false" >> "${GITHUB_ENV}"
+ fi
+ - name: Create Pull Request
+ if: env.changes_made == 'true'
+ uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
+ with:
+ token: ${{ secrets.APOELSTRA_CREATE_PR_TOKEN }}
+ author: Update RBMT Bot <bot@example.com>
+ committer: Update RBMT Bot <bot@example.com>
+ title: Automated weekly update to cargo-rbmt (to ${{ env.rbmt_semver }})
+ body: |
+ Automated update to rbmt-version by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
+ commit-message: Automated update to cargo-rbmt-${{ env.rbmt_semver }}
+ branch: create-pull-request/weekly-rbmt-update
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.