From 00896adfdae758cb20a6169bc327184287a1f6b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20N=C3=A4gele?= Date: Fri, 10 Dec 2021 19:11:28 +0100 Subject: [PATCH] Fix login to ghcr.io (#120) --- .github/workflows/release.yaml | 10 +++++++++- .goreleaser.yml | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c31ec9e..090e43b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -45,9 +45,17 @@ jobs: run: | mage -v test + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Release run: | echo "Building release ${{ github.event.inputs.version }}" mage -v release env: - GITHUB_TOKEN: "${{ secrets.CI_TOKEN }}" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 46ff4c2..8551e74 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -33,12 +33,15 @@ brews: - tap: owner: craftypath name: homebrew-tap + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" commit_author: name: craftypath-ci-bot email: craftypath-ci-bot@users.noreply.github.com folder: Formula homepage: https://github.com/craftypath/gotf/ description: Handling multiple environments with Terraform made easy + install: | + bin.install "gotf" test: | system "#{bin}/gotf --version" dockers: