Skip to content

Commit

Permalink
separate build and push
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Oct 28, 2024
1 parent 3b010f8 commit f3834c1
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/windows-ssh-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,22 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
labels: |
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
images: ${{ github.GITHUB_REPOSITORY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ env.TAG }}
# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@v5
# with:
# labels: |
# org.opencontainers.image.title=${{ env.IMAGE_NAME }}
#
# images: ${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
# tags: |
# type=raw,value=${{ env.TAG }}

- name: Build image
# can't use build-push-action on Windows
# https://github.com/docker/build-push-action/issues/18
run: |
docker build --push -t ${{ github.GITHUB_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} -f win_base_Dockerfile ci/ssh
docker build -t ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} -f win_base_Dockerfile ci/ssh
- name: Push image
run: |
docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}

0 comments on commit f3834c1

Please sign in to comment.