Skip to content

Commit

Permalink
Merge pull request #261 from anchore/move-docker-login-after-keychain…
Browse files Browse the repository at this point in the history
…-step

Move docker login after keychain creation
  • Loading branch information
wagoodman authored Mar 25, 2021
2 parents b8ad37c + 5dc5b44 commit 7ce9ef6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ jobs:
${{ github.workspace }}/.tmp
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('Makefile') }}-${{ hashFiles('**/go.sum') }}

- name: Login to Docker Hub
run: echo ${{ secrets.TOOLBOX_DOCKER_PASS }} | docker login docker.io -u ${{ secrets.TOOLBOX_DOCKER_USER }} --password-stdin

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
Expand All @@ -117,6 +114,8 @@ jobs:
- name: Build snapshot artifacts
run: make release
env:
DOCKER_USERNAME: ${{ secrets.TOOLBOX_DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.TOOLBOX_DOCKER_PASS }}
GITHUB_TOKEN: ${{ secrets.ANCHORE_GIT_READ_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.SIGNING_GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.SIGNING_GPG_PASSPHRASE }}
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ release: clean-dist changelog-release ## Build and publish final binaries and pa
# Prepare for macOS-specific signing process
.github/scripts/mac-prepare-for-signing.sh

# login to docker
@echo $${DOCKER_PASSWORD} | docker login docker.io -u $${DOCKER_USERNAME} --password-stdin

# create a config with the dist dir overridden
echo "dist: $(DISTDIR)" > $(TEMPDIR)/goreleaser.yaml
cat .goreleaser.yaml >> $(TEMPDIR)/goreleaser.yaml
Expand Down

0 comments on commit 7ce9ef6

Please sign in to comment.