Skip to content

Commit

Permalink
Merge branch 'main' into evya/add_ensure_db_creds_secret
Browse files Browse the repository at this point in the history
  • Loading branch information
omris94 authored Nov 2, 2023
2 parents 531a1ec + c7bf3bf commit 8d2cdd6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
tags: ${{ env.REGISTRY }}/credentials-operator:${{ github.sha }}
push: true
network: host
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -80,4 +80,4 @@ jobs:
- name: Tag Images as latest
run: |-
retag_image_as_latest() { if [[ $(gcloud container images add-tag "${{ env.REGISTRY }}/$1:${{ github.sha }}" "${{ env.REGISTRY }}/$1:latest" --quiet) ]]; then echo "Failed tagging $1 as latest"; exit 1; fi } # using --quiet to avoid prompt
retag_image_as_latest credentials-operator
retag_image_as_latest credentials-operator
25 changes: 19 additions & 6 deletions .github/workflows/release-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,26 @@ jobs:
username: otterize
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
with:
driver-opts: network=host


- name: Push to Docker Hub
run: |-
docker pull ${{ env.REGISTRY }}/credentials-operator:${{ github.sha }}
docker tag ${{ env.REGISTRY }}/credentials-operator:${{ github.sha }} otterize/credentials-operator:${{ github.ref_name }}
docker tag ${{ env.REGISTRY }}/credentials-operator:${{ github.sha }} otterize/credentials-operator:latest
docker push otterize/credentials-operator:${{ github.ref_name }}
docker push otterize/credentials-operator:latest
uses: docker/build-push-action@v2
with:
context: .github/workflows
file: .github/workflows/release.Dockerfile
tags: otterize/credentials-operator:latest,otterize/credentials-operator:${{ github.ref_name }}
push: true
network: host
platforms: linux/amd64,linux/arm64
build-args: |
"VERSION=${{ github.ref_name }}"
"SOURCE_IMAGE=${{ env.REGISTRY }}/credentials-operator:${{ github.sha }}"
commit-latest-build-tag-to-helm-chart:
name: Commit Latest Build Tag
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# The only purpose this Dockerfile serves is to be able to run buildx to push a multi-platform image without rebuilding.

ARG SOURCE_IMAGE

FROM alpine as releaser
ARG VERSION
RUN echo -n $VERSION > ./version

FROM $SOURCE_IMAGE
COPY --from=releaser /version .

0 comments on commit 8d2cdd6

Please sign in to comment.