Skip to content

Commit

Permalink
Use dedicated token for the workflow that bumps the Tekton version
Browse files Browse the repository at this point in the history
The reason for this is that only through a Personal Access Token, it is possible to update files insight .github/workflows
  • Loading branch information
SaschaSchwarze0 committed Aug 7, 2024
1 parent 17d516a commit 9382fb7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/update-tekton-version.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
# This workflow updates the Tekton version insight Shipwright Build to the latest LTS.
# As part of that it uses a Personal Access Token that is stored as secret in shipwrigh-io/build
# using the name SHIPWRIGHT_BUILD_WRITE_WORKFLOWS. The token expires every 90 days. Instructions
# to renew it can be found in the "HOW TO update SHIPWRIGHT_BUILD_WRITE_WORKFLOWS" note in the
# 1Password store that Shipwright Administrators have access to.
name: Update Tekton version
on:
schedule:
Expand All @@ -8,12 +13,12 @@ on:
jobs:
check-new-versions:
if: contains(github.event.comment.body, '/rebase') || github.event_name == 'schedule'
permissions:
pull-requests: write # To be able to create pull requests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.SHIPWRIGHT_BUILD_WRITE_WORKFLOWS }}
- name: Install Go
uses: actions/setup-go@v5
with:
Expand All @@ -28,6 +33,8 @@ jobs:
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.SHIPWRIGHT_BUILD_WRITE_WORKFLOWS }}

commit-message: Bump Tekton Pipeline from ${{ steps.update-tekton.outputs.OLD_VERSION }} to ${{ steps.update-tekton.outputs.NEW_VERSION }}
title: Bump Tekton Pipeline from ${{ steps.update-tekton.outputs.OLD_VERSION }} to ${{ steps.update-tekton.outputs.NEW_VERSION }}
body: |
Expand Down

0 comments on commit 9382fb7

Please sign in to comment.