Skip to content

Commit

Permalink
GitHub Token
Browse files Browse the repository at this point in the history
Previously all of the workflows used secrets.GITHUB_TOKEN.  In the end the
de-privileged nature of this token proved to be too much and this change
migrates the workflows to use bot-specific token instead.

Signed-off-by: Ben Hale <bhale@vmware.com>
  • Loading branch information
nebhale committed Nov 3, 2020
1 parent 29b705b commit 6921bc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/pipeline-descriptor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
github_token: ${{ secrets.JAVA_GITHUB_TOKEN }}

codeowners:
- path: "*"
owner: "@paketo-buildpacks/java-buildpacks"
6 changes: 3 additions & 3 deletions .github/workflows/update-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.15"
Expand All @@ -20,6 +19,7 @@ jobs:
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/paketo-buildpacks/pipeline-builder/cmd/octo
- uses: actions/checkout@v2
- id: pipeline
name: Update Pipeline
run: |
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
echo "::set-output name=release-notes::${RELEASE_NOTES//$'\n'/%0A}"
env:
DESCRIPTOR: .github/pipeline-descriptor.yml
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.JAVA_GITHUB_TOKEN }}
- uses: peter-evans/create-pull-request@v3
with:
body: |-
Expand All @@ -75,4 +75,4 @@ jobs:
labels: semver:patch, type:task
signoff: true
title: Bump pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.JAVA_GITHUB_TOKEN }}

0 comments on commit 6921bc6

Please sign in to comment.