Skip to content

Commit

Permalink
fix: add docker login step to release actions (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuannie1 authored Aug 12, 2022
1 parent 22998ca commit 5fe6c12
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ jobs:
with:
go-version: 1.18
if: ${{ steps.release.outputs.release_created }}

- name: Log in to Docker GitHub registry
run: |
docker login docker.pkg.github.com -u ${GITHUB_ACTOR} -p ${GITHUB_TOKEN}
env:
GITHUB_ACTOR: ${{ secrets.CZIBUILDBOT_USERNAME }}
GITHUB_TOKEN: ${{ secrets.CZIBUILDBOT_GITHUB_KEY }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down Expand Up @@ -98,6 +106,13 @@ jobs:
git tag -a "${VERSION}" -m "${MESSAGE}"
git push origin "${VERSION}"
- name: Log in to Docker GitHub registry
run: |
docker login docker.pkg.github.com -u ${GITHUB_ACTOR} -p ${GITHUB_TOKEN}
env:
GITHUB_ACTOR: ${{ secrets.CZIBUILDBOT_USERNAME }}
GITHUB_TOKEN: ${{ secrets.CZIBUILDBOT_GITHUB_KEY }}

- name: Prerelease
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ brews:
owner: chanzuckerberg
name: homebrew-tap
homepage: "https://github.com/chanzuckerberg/aws-oidc"
test: system "#{bin}/aws-oidc-rc"
test: system "#{bin}/aws-oidc version"
4 changes: 1 addition & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ builds:
- arm64
ldflags:
- "-w -s -X github.com/chanzuckerberg/aws-oidc/pkg/util.GitSha={{.Commit}} -X github.com/chanzuckerberg/aws-oidc/pkg/util.Version={{.Version}} -X github.com/chanzuckerberg/aws-oidc/pkg/util.Dirty=false -X github.com/chanzuckerberg/aws-oidc/pkg/util.Release=true"
flags:
- -trimpath
dockers:
- dockerfile: Dockerfile
image_templates:
Expand All @@ -33,4 +31,4 @@ brews:
owner: chanzuckerberg
name: homebrew-tap
homepage: "https://github.com/chanzuckerberg/aws-oidc"
test: system "#{bin}/aws-oidc"
test: system "#{bin}/aws-oidc version"

0 comments on commit 5fe6c12

Please sign in to comment.