Skip to content

Commit

Permalink
Revert to Registry Cache, push latest operator image
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Dec 11, 2024
1 parent bc39c7b commit 84f0707
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ jobs:
sha=${GITHUB_SHA::8}
ts=$(date +%s)
tag=${GITHUB_REF_NAME}-${sha}-${ts}
tag_latest=${GITHUB_REF_NAME}-latest
image="radix-operator"
echo "tag=$tag" >> $GITHUB_OUTPUT
echo "fullname=ghcr.io/equinor/$image:$tag" >> $GITHUB_OUTPUT
echo "fullname_latest=ghcr.io/equinor/$image:$tag_latest" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -49,9 +51,11 @@ jobs:
platforms: |
linux/amd64
linux/arm64
tags: "${{ steps.metadata.outputs.fullname }}"
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ steps.metadata.outputs.fullname }}
${{ steps.metadata.outputs.fullname_latest }}
cache-from: "type=registry,ref=${{ steps.metadata.outputs.fullname_latest }}"
cache-to: "type=registry,ref=${{ steps.metadata.outputs.fullname_latest }}",mode=max"

build-pipelinerunner:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -96,9 +100,8 @@ jobs:
tags: |
${{ steps.metadata.outputs.fullname }}
${{ steps.metadata.outputs.fullname_latest }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: "type=registry,ref=${{ steps.metadata.outputs.fullname_latest }}"
cache-to: "type=registry,ref=${{ steps.metadata.outputs.fullname_latest }}",mode=max"

deploy:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -157,6 +160,8 @@ jobs:
run: |
echo "operator=${{ matrix.target.acr-name }}.azurecr.io/radix-operator:${{ needs.build-operator.outputs.tag }}" >> $GITHUB_OUTPUT
echo "pipeline=${{ matrix.target.acr-name }}.azurecr.io/radix-pipeline:${{ needs.build-pipelinerunner.outputs.tag_latest }}" >> $GITHUB_OUTPUT
echo "cache-radix-operator-tag=cache-radix-operator-${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
echo "cache-pipeline-runner-tag=cache-pipeline-runner-${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
- name: ACR Login
run: az acr login --name ${{ matrix.target.acr-name }}
Expand Down

0 comments on commit 84f0707

Please sign in to comment.