-
Notifications
You must be signed in to change notification settings - Fork 439
42 lines (40 loc) · 1.77 KB
/
update-cargo-lock.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update Cargo.lock Pull Request
on:
schedule:
- cron: '0 6 * * TUE,WED,THU,FRI,SAT,SUN' # every day except Monday (reserved for dependabot)
workflow_dispatch: # allows to manually trigger the workflow as well
jobs:
update-cargo-lock-file:
name: Update Cargo.lock file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
# we use a GitHub app token so that other workflows can react to the
# creation of the Pull Request.
# Following these guidelines -> https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
# For additional info -> https://github.com/actions/create-github-app-token
- name: generate GitHub app token
id: generate-app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.UPDATE_CARGO_LOCK_APP_ID }}
private-key: ${{ secrets.UPDATE_CARGO_LOCK_APP_PRIVATE_KEY }}
- name: cargo update
run: cargo update
- name: create pull request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-app-token.outputs.token }}
branch: "create-pull-request/update-cargo-lock"
title: "Cargo.lock update"
body: |
This PR has been automatically created by the [update-cargo-lock.yml](https://github.com/tracel-ai/burn/blob/main/.github/workflows/update-cargo-lock.yml) workflow.
commit-message: |
Update Cargo.lock
This commit has been automatically generated by
update-cargo-lock.yml workflow.
labels: dependencies,automated
delete-branch: true