Promote to stable #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Promote to stable | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to promote (e.g. 0.5.7). Defaults to 'latest'." | |
| required: false | |
| default: "latest" | |
| target: | |
| description: "Target tag suffix (e.g. 'stable', 'stable-test'). Defaults to 'stable'." | |
| required: false | |
| default: "stable" | |
| env: | |
| QUAY_STACKROX_IO_RW_USERNAME: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }} | |
| QUAY_STACKROX_IO_RW_PASSWORD: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }} | |
| jobs: | |
| promote-stable: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Log in to Quay | |
| run: | | |
| skopeo login -u "$QUAY_STACKROX_IO_RW_USERNAME" --password-stdin <<<"$QUAY_STACKROX_IO_RW_PASSWORD" quay.io | |
| - name: Retag all flavors as stable | |
| run: | | |
| VERSION="${{ inputs.version }}" | |
| VERSION="${VERSION:-latest}" | |
| for flavor in scanner-build scanner-test stackrox-build stackrox-test stackrox-ui-test jenkins-plugin; do | |
| SRC="quay.io/stackrox-io/apollo-ci:${flavor}-${VERSION}" | |
| TARGET="${{ inputs.target }}" | |
| TARGET="${TARGET:-stable}" | |
| DST="quay.io/stackrox-io/apollo-ci:${flavor}-${TARGET}" | |
| echo "Promoting ${SRC} → ${DST}" | |
| skopeo copy "docker://${SRC}" "docker://${DST}" | |
| done |