cargo-binstall/.github/workflows/upgrade-transitive-deps.yml
dependabot[bot] d657fbe518
build(deps): bump actions/checkout from 3 to 4 (#1346)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 02:10:48 +00:00

48 lines
1.4 KiB
YAML

name: Upgrade transitive dependencies
on:
workflow_dispatch: # Allow running on-demand
schedule:
- cron: '0 3 * * 5'
jobs:
upgrade:
name: Upgrade & Open Pull Request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- name: Generate branch name
run: |
git checkout -b deps/transitive/${{ github.run_id }}
- name: Install rust
run: |
rustup toolchain install stable --no-self-update --profile minimal
- name: Upgrade transitive dependencies
run: cargo update --aggressive
- name: Detect changes
id: changes
run:
# This output boolean tells us if the dependencies have actually changed
echo "count=$(git status --porcelain=v1 | wc -l)" >> $GITHUB_OUTPUT
- name: Commit and push changes
# Only push if changes exist
if: steps.changes.outputs.count > 0
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git commit -am "dep: Upgrade transitive dependencies"
git push origin HEAD
- name: Open pull request if needed
if: steps.changes.outputs.count > 0
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create --base main --fill --label 'PR: dependencies'