Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/promote-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Loading