From 4c30c1dfb1390097c81030dfd9ad01b2d6015c76 Mon Sep 17 00:00:00 2001 From: ngovinh2k2 Date: Wed, 11 Feb 2026 11:50:40 +0700 Subject: [PATCH] feat: add workflow to promote docker image to stable --- .github/workflows/cd-promote-stable.yml | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/cd-promote-stable.yml diff --git a/.github/workflows/cd-promote-stable.yml b/.github/workflows/cd-promote-stable.yml new file mode 100644 index 0000000..1ab8307 --- /dev/null +++ b/.github/workflows/cd-promote-stable.yml @@ -0,0 +1,32 @@ +name: Promote Docker Image to Stable + +on: + workflow_dispatch: + inputs: + version: + description: "Docker image version (ex: 0.0.1)" + required: true + +jobs: + promote: + runs-on: ubuntu-latest + + permissions: + packages: write + + steps: + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Promote version to stable + run: | + IMAGE=ghcr.io/${{ github.repository }} + VERSION=${{ inputs.version }} + + docker buildx imagetools create \ + -t $IMAGE:stable \ + $IMAGE:$VERSION