Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ jobs:
ref: "master"
# include tags so we can determine new version
fetch-depth: 0
- name: Resolve Docker config directory
run: |
# Sets DOCKER_CONFIG for all future steps to an absolute path
mkdir -p "$DOCKER_CONFIG";
echo "DOCKER_CONFIG=$(cd "$DOCKER_CONFIG" && pwd)" >> "$GITHUB_ENV";
env:
DOCKER_CONFIG: ${{ secrets.DOCKER_CONFIG }}
- name: Set up Docker Buildx
# dockers_v2 builds via `docker buildx build`; goreleaser expects the
# docker-container driver, which this action configures by default
Expand All @@ -50,7 +57,6 @@ jobs:
echo "$DOCKER_HUB_TOKEN" | docker login -u "$DOCKER_HUB_USER" --password-stdin "$DOCKER_REGISTRY";
echo "$GCP_KEY" | docker login -u "$GCR_USER" --password-stdin "$GCR_REGISTRY";
env:
DOCKER_CONFIG: ${{ secrets.DOCKER_CONFIG }}
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
Expand All @@ -75,7 +81,6 @@ jobs:
env:
GOPATH: ${{ runner.workspace }}
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
DOCKER_CONFIG: ${{ secrets.DOCKER_CONFIG }}
GCP_KEY: ${{ secrets.GCP_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish to Cloudsmith
Expand Down Expand Up @@ -110,8 +115,9 @@ jobs:
docker logout "$DOCKER_REGISTRY";
docker logout "$GCR_REGISTRY";
set -e;
rm -rf "$DOCKER_CONFIG";
# leave the rest of the dir alone; it holds the buildx builder state
# that setup-buildx-action tears down in its post-job step
rm -f "$DOCKER_CONFIG/config.json";
env:
DOCKER_CONFIG: ${{ secrets.DOCKER_CONFIG }}
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
GCR_REGISTRY: ${{ secrets.GCR_REGISTRY }}
Loading