diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b6a5099ae..70d8605b9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -63,6 +63,19 @@ jobs: --source="${{ github.event.repository.html_url }}" \ --revision="${GITHUB_REF_NAME}/${GITHUB_SHA}" + - name: Login to Quay Container Registry + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + - name: Publish Kustomize OCI artifact to GHCR + run: | + flux push artifact ${{ env.KUSTOMIZE_REPO }}:${{ github.ref_name }} \ + --path="./deploy/kustomize" \ + --source="${{ github.event.repository.html_url }}" \ + --revision="${GITHUB_REF_NAME}/${GITHUB_SHA}" + image: runs-on: ubuntu-latest strategy: @@ -102,13 +115,18 @@ jobs: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV - name: Build and push - env: - KO_DOCKER_REPO: ${{ matrix.repo }}/hubertstefanski/grafana-operator run: | - ko build --sbom=none --bare --platform linux/arm64,linux/arm/v7,linux/amd64 -t ${{ github.ref_name }} \ + declare -a arr=("quay.io" "ghcr.io" ) + + for i in "${arr[@]}" + do + KO_DOCKER_REPO: ${i}/hubertstefanski/grafana-operator + ko build --sbom=none --bare --platform linux/arm64,linux/arm/v7,linux/amd64 -t ${{ github.ref_name }} \ --image-label org.opencontainers.image.title=grafana-operator \ --image-label org.opencontainers.image.description="An operator for Grafana that installs and manages Grafana instances & Dashboards & Datasources through Kubernetes/OpenShift CRs" \ --image-label org.opencontainers.image.url=${{ github.server_url }}/${{ github.repository }} \ --image-label org.opencontainers.image.revision=${{ github.sha }} \ --image-label org.opencontainers.image.version=${{ github.ref_name }} \ --image-label org.opencontainers.image.created=${{ env.BUILD_DATE }} + done +