From 3aaefbd49682c25c5c56f69f40c1512db993a5d7 Mon Sep 17 00:00:00 2001 From: Mick Stanciu Date: Wed, 23 Mar 2022 13:00:32 +1100 Subject: [PATCH] INTG-2169 docker login (#230) docker login in GitHub actions --- .github/workflows/goreleaser.yml | 12 ++++++++---- Makefile | 3 --- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 00054053..a01532d4 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -25,12 +25,16 @@ jobs: with: go-version: 1.17 + - name: Login to Docker Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: docker + password: ${{ secrets.GITHUB_TOKEN }} + - name: Setup release environment run: |- echo 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' >> .release-env - name: Run GoReleaser - run: make release \ - docker-user=docker \ - docker-password=${{ secrets.GITHUB_TOKEN }} \ - docker-host=ghcr.io + run: make release diff --git a/Makefile b/Makefile index e512b0d6..41a8c30e 100644 --- a/Makefile +++ b/Makefile @@ -46,9 +46,6 @@ release: docker run \ --rm \ --privileged \ - --env DOCKER_USERNAME=$(docker-user) \ - --env DOCKER_PASSWORD=$(docker-password) \ - --env DOCKER_HOST=$(docker-host) \ --env-file .release-env \ -v /var/run/docker.sock:/var/run/docker.sock \ -v `pwd`:/go/src/$(PACKAGE_NAME) \