Skip to content

Commit

Permalink
DEVOPS-499: Upload artifacts to aqua registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Lihi Zitzer committed Dec 23, 2024
1 parent ebd9a00 commit 4262c4f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }})
Expand Down Expand Up @@ -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

0 comments on commit 4262c4f

Please sign in to comment.