Skip to content

Commit

Permalink
Use autogen GITHUB_TOKEN (#214)
Browse files Browse the repository at this point in the history
* Change the `GITHUB_TOKEN` used by the `Build` workflow to the default
one.
* Add the necessary scopes to the token to allow it to create releases
and push images to GHCR.
  • Loading branch information
andrew-farries authored Dec 8, 2023
1 parent 6d648e7 commit 9efe215
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Build
on: [push, pull_request]
permissions:
contents: write
packages: write
jobs:
test:
name: test (postgres ${{ matrix.pgVersion }})
Expand Down Expand Up @@ -122,7 +125,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Go
uses: actions/setup-go@v4
Expand All @@ -136,6 +139,6 @@ jobs:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
DOCKER_USERNAME: ghcr.io/${{ github.repository_owner }}

0 comments on commit 9efe215

Please sign in to comment.