diff --git a/.github/workflows/promote-stable.yaml b/.github/workflows/promote-stable.yaml index 392b6994..715c40d5 100644 --- a/.github/workflows/promote-stable.yaml +++ b/.github/workflows/promote-stable.yaml @@ -7,6 +7,10 @@ on: 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 }} @@ -18,14 +22,16 @@ jobs: steps: - name: Log in to Quay run: | - docker login -u "$QUAY_STACKROX_IO_RW_USERNAME" --password-stdin <<<"$QUAY_STACKROX_IO_RW_PASSWORD" quay.io + 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}" - DST="quay.io/stackrox-io/apollo-ci:${flavor}-stable" + TARGET="${{ inputs.target }}" + TARGET="${TARGET:-stable}" + DST="quay.io/stackrox-io/apollo-ci:${flavor}-${TARGET}" echo "Promoting ${SRC} → ${DST}" - docker buildx imagetools create --tag "${DST}" "${SRC}" + skopeo copy "docker://${SRC}" "docker://${DST}" done