Skip to content

Commit

Permalink
ci(trunk): Add inputs to the trunk upgrade action (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris3ware authored Feb 3, 2025
1 parent 5ecd2fb commit e514406
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/trunk-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Trunk Upgrade
on:
schedule:
- cron: 0 1 * * 1
- cron: 0 1 * * 2
workflow_dispatch: {}

permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.repository }}
cancel-in-progress: true

jobs:
get-temp-token:
uses: 3ware/workflows/.github/workflows/get-workflow-token.yaml@57a900982a56bebaf91e660a56adb7f021690d15 # v4.0.0
secrets: inherit

trunk-upgrade:
needs: [get-temp-token]
name: Upgrade Trunk
runs-on: ubuntu-latest
timeout-minutes: 30
Expand All @@ -18,5 +25,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Decrypt the installation access token
id: decrypt-token
run: |
DECRYPTED_TOKEN=$(gpg --decrypt --quiet --batch --passphrase "$KEY" \
--output - <(echo "${{ needs.get-temp-token.outputs.temp-token }}" \
| base64 --decode))
echo "::add-mask::$DECRYPTED_TOKEN"
echo "temp-token=$DECRYPTED_TOKEN" >> $GITHUB_OUTPUT
- name: Trunk Upgrade
uses: trunk-io/trunk-action/upgrade@8e4c812061ece3fa253bbfa5a80ee1caefa19eb1 # v1.22.9
with:
github-token: ${{ steps.decrypt-token.outputs.temp-token }}
prefix: "ci(trunk):"

0 comments on commit e514406

Please sign in to comment.