Skip to content

Commit

Permalink
Add upgrade trunk workflow (#587)
Browse files Browse the repository at this point in the history
Adds workflow to auto-upgrade trunk.yaml to bleeding edge. Runs only on
a weekly cadence since we usually handle versioning pretty
intentionally/explicitly in this repo.

Successful
[run](https://github.com/trunk-io/plugins/actions/runs/7359850287/job/20035560778)
and [PR](#603)
  • Loading branch information
TylerJang27 authored Dec 29, 2023
1 parent a895591 commit 2a092a3
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/upgrade_trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Upgrade Trunk Weekly
on:
schedule:
# Weekly at midnight W morning
- cron: 0 8 * * 3
workflow_dispatch: {}

permissions: read-all

jobs:
trunk_upgrade:
name: Upgrade Trunk
runs-on: ubuntu-latest
permissions:
contents: write # For trunk to create PRs
pull-requests: write # For trunk to create PRs
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create App Token for TrunkBuild App (Internal)
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.TRUNK_OPEN_PR_APP_ID }}
private_key: ${{ secrets.TRUNK_OPEN_PR_APP_PRIVATE_KEY }}

- name: Trunk Upgrade
uses: trunk-io/trunk-action/upgrade@98224163e8e5d90318f26bca1eeb605f8ce8781b
with:
arguments: -n --bleeding-edge
github-token: ${{ steps.generate-token.outputs.token }}
reviewers: TylerJang27

0 comments on commit 2a092a3

Please sign in to comment.