From 536a6a6259f5f7ec63a91304b5f53b1f601cdef3 Mon Sep 17 00:00:00 2001 From: Oleg Balunenko Date: Thu, 18 Feb 2021 18:02:32 +0300 Subject: [PATCH] chore(ci): Update release workflow with docker configs --- .github/workflows/release.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70150a47..1bf27c4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,6 +60,16 @@ jobs: run: | make test + - name: Docker Login + if: success() && startsWith(github.ref, 'refs/tags/v') + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + echo "${GITHUB_TOKEN}" | docker login ghcr.io --username $GITHUB_ACTOR --password-stdin + - name: Install GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -72,3 +82,8 @@ jobs: make release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Clear + if: always() && startsWith(github.ref, 'refs/tags/v') + run: | + rm -f ${HOME}/.docker/config.json