Skip to content

Weekly Update

Weekly Update #14

Workflow file for this run

name: Weekly Update
on:
schedule:
- cron: '0 8 * * 0'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
upgrade:
name: Build on Ubuntu Latest (Stable)
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_APP_KEY }}
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- id: setup
name: Setup Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Update Cargo.lock
run: cargo update --verbose
- name: Build
run: cargo build --release --verbose
- name: Push changes
continue-on-error: true
run: |
git config user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
git add Cargo.lock
git commit -m "Weekly Cargo.lock update"
git push --force