Skip to content

Commit

Permalink
clone to docker hub
Browse files Browse the repository at this point in the history
  • Loading branch information
sarathchandra24 committed Mar 3, 2024
1 parent aba824c commit bb18188
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/build-op-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
outputs:
IMG_VERSION: ${{ steps.image-metadata.outputs.version }}
IMG_NAME: ${{ env.GITHUB_IMAGE }}
OPERATOR_DOCKER_IMG: "${{ env.REGISTRY_REPO }}/${{ env.DOCKER_IMAGE }}"

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -88,5 +90,24 @@ jobs:
source_registry: ghcr.io
platforms: '["linux/arm64", "linux/amd64"]'
secrets:
registry_username: ${{ github.actor }}
registry_username: ${{ github.actor_id }}
registry_password: ${{ secrets.GITHUB_TOKEN }}

release-image-to-docker-hub:
if: always()
name: Release Image to Docker Hub
uses: ./.github/workflows/call-clone-images.yaml
needs:
- operator-build
- scan-operator-image
with:
source_image: "${{ needs.operator-build.outputs.IMG_NAME }}:${{ needs.operator-build.outputs.IMG_VERSION }}"
source_registry: ghcr.io
target_image: ${{ needs.operator-build.outputs.OPERATOR_DOCKER_IMG }}
target_registry: docker.io
platforms: "['linux/arm64', 'linux/amd64']"
secrets:
source_registry_username: ${{ github.actor_id }}
source_registry_token: ${{ secrets.GITHUB_TOKEN }}
target_registry_username: ${{ secrets.REGISTRY_USER }}
target_registry_token: ${{ secrets.REGISTRY_PASSWORD }}

0 comments on commit bb18188

Please sign in to comment.