Skip to content

Commit

Permalink
github workflow: login first, then build and push
Browse files Browse the repository at this point in the history
Signed-off-by: Riccardo Piccoli <[email protected]>
  • Loading branch information
rccrdpccl committed Jun 27, 2024
1 parent d234ecc commit d18f48f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,24 @@ jobs:
run: |
sed -i "s,quay.io/edge-infrastructure/openshift-capi-agent-bootstrap:latest,${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:${{env.VERSION}}," bootstrap-components.yaml
sed -i "s,quay.io/edge-infrastructure/openshift-capi-agent-controlplane:latest,${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:${{env.VERSION}}," controlplane-components.yaml
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and publish bootstrap image to Quay
uses: docker/build-push-action@v5
with:
push: true
context: ${{ env.context }}
registry: ${{ secrets.REGISTRY_SERVER }}
repository: ${{ secrets.REGISTRY_NAMESPACE }}/${{ env.bootstrap_image_name }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
tags: "${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:${{env.VERSION}}, ${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:latest"
build-args: "PROVIDER=bootstrap"
- name: Build and publish bootstrap image to Quay
uses: docker/build-push-action@v1
with:
push: true
context: ${{ env.context }}
registry: ${{ secrets.REGISTRY_SERVER }}
repository: ${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}
password: ${{ secrets.REGISTRY_PASSWORD }}
tags: "${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:${{env.VERSION}}, ${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:latest"
build-args: "PROVIDER=controlplane"
- name: Create GitHub Release
Expand Down

0 comments on commit d18f48f

Please sign in to comment.