Skip to content

Commit

Permalink
Fix docker image publish (spotify#3)
Browse files Browse the repository at this point in the history
Fix docker image publish action.
  • Loading branch information
elanv committed Jul 7, 2021
1 parent 743b964 commit 4224923
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}
- name: Get tag
id: dockerTag
run: |
echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
- name: Build and push to GitHub Packages
run: |
make operator-image \
&& docker tag ${{ steps.meta.outputs.tags[0] }} ${{ steps.meta.outputs.tags[1] }} \
&& docker push ${{ steps.meta.outputs.tags[0] }} \
&& docker push ${{ steps.meta.outputs.tags[1] }}
echo "Build ${REPO}:${TAG}..."
IMG="${REPO}:${TAG}" make operator-image \
&& docker tag "${REPO}:${TAG}" "${REPO}:latest" \
&& docker push "${REPO}:${TAG}" \
&& docker push "${REPO}:latest"
env:
IMG: ${{ steps.meta.outputs.tags[0] }}
REPO: ghcr.io/${{ github.repository }}
TAG: ${{ steps.dockerTag.outputs.tag }}

0 comments on commit 4224923

Please sign in to comment.