From da817719da32341c4bb9c848ae19895b97023f4e Mon Sep 17 00:00:00 2001 From: Ben Meier Date: Wed, 24 Apr 2024 14:28:13 +0100 Subject: [PATCH] fix(ci): login docker registry Signed-off-by: Ben Meier --- .github/workflows/release.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d4cfdf1..7c037a3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,7 +22,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.22 + go-version-file: 'go.mod' - name: Run Go Tests run: go test ./... -cover -race @@ -47,11 +47,7 @@ jobs: needs: - test runs-on: ubuntu-latest - permissions: - # must be able to setup a release - contents: write - # must be able to push a package - packages: write + permissions: write-all steps: - name: Checkout @@ -79,6 +75,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - + name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push docker image uses: docker/build-push-action@v5