From 954780e7852c0b58675cd5549bc7a3d0840d01a7 Mon Sep 17 00:00:00 2001 From: Lihi Zitzer Date: Mon, 23 Dec 2024 13:54:02 +0200 Subject: [PATCH 1/2] DEVOPS-685: Upload artifacts to aqua registry --- .github/workflows/release.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7348e21f..b12a9b60 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,6 +26,11 @@ jobs: username: ${{ vars.GHCR_USER || env.GH_USER }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Setup ORAS + uses: oras-project/setup-oras@v1 + with: + version: '1.0.0' + - name: Deploy policy bundle to ghcr.io (for backwards compatibility) run: | tags=(latest ${{ env.RELEASE_VERSION}} ${{env.MINOR_VERSION }} ${{ env.MAJOR_VERSION }}) @@ -64,3 +69,21 @@ jobs: --artifact-type application/vnd.cncf.openpolicyagent.config.v1+json \ bundle.tar.gz:application/vnd.cncf.openpolicyagent.layer.v1.tar+gzip done + + - name: login to Aqua Container Registry + uses: azure/docker-login@v2 + with: + login-server: ${{ secrets.AQUSEC_ACR_REGISTRY_NAME }} + username: ${{ secrets.AQUASEC_ACR_USERNAME }} + password: ${{ secrets.AQUASEC_ACR_PASSWORD }} + + - name: Deploy checks bundle to Aqua Container Registry + run: | + tags=(latest ${{ env.RELEASE_VERSION}} ${{env.MINOR_VERSION }} ${{ env.MAJOR_VERSION }}) + repo="${{ secrets.AQUSEC_ACR_REGISTRY_NAME }}/${{ github.event.repository.name }}" + for tag in ${tags[@]}; do + echo "Pushing artifact with tag: ${tag}" + oras push ${repo}:${tag} \ + --artifact-type application/vnd.cncf.openpolicyagent.config.v1+json \ + bundle.tar.gz:application/vnd.cncf.openpolicyagent.layer.v1.tar+gzip + done \ No newline at end of file From 97977bd968f382a22c5bb465655d1693ed78df7a Mon Sep 17 00:00:00 2001 From: Lihi Zitzer Date: Mon, 23 Dec 2024 14:56:17 +0200 Subject: [PATCH 2/2] Add tag 1 --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b12a9b60..0c62861d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -79,7 +79,7 @@ jobs: - name: Deploy checks bundle to Aqua Container Registry run: | - tags=(latest ${{ env.RELEASE_VERSION}} ${{env.MINOR_VERSION }} ${{ env.MAJOR_VERSION }}) + tags=(1 latest ${{ env.RELEASE_VERSION}} ${{env.MINOR_VERSION }} ${{ env.MAJOR_VERSION }}) repo="${{ secrets.AQUSEC_ACR_REGISTRY_NAME }}/${{ github.event.repository.name }}" for tag in ${tags[@]}; do echo "Pushing artifact with tag: ${tag}"