Skip to content

Commit

Permalink
docker login before
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Nov 27, 2023
1 parent b24a7f0 commit 222dc63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .github/actions/build-push-kotsadm-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ inputs:
description: 'Git tag'
required: true

registry-username:
description: 'Username to login to registry'
default: ''
required: false

registry-password:
description: 'Password to login to registry'
default: ''
required: false

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -36,3 +46,5 @@ runs:
archs: x86_64
tag: ${{ inputs.image-name }}
vcs-url: true
generic-user: ${{ inputs.registry-username }}
generic-pass: ${{ inputs.registry-password }}
10 changes: 6 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/actions/build-push-kotsadm-image
with:
image-name: kotsadm/kotsadm:${{ needs.generate-tag.outputs.tag }}
git-tag: ${{ needs.generate-tag.outputs.tag }}
- uses: azure/docker-login@v1
env:
DOCKER_CONFIG: ./.docker
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- uses: ./.github/actions/build-push-kotsadm-image
with:
image-name: kotsadm/kotsadm:${{ needs.generate-tag.outputs.tag }}
git-tag: ${{ needs.generate-tag.outputs.tag }}
# registry-username: ${{ secrets.DOCKERHUB_USER }}
# registry-password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build tagged release
env:
GIT_TAG: ${{ needs.generate-tag.outputs.tag }}
Expand Down

0 comments on commit 222dc63

Please sign in to comment.