This is an automated email from the ASF dual-hosted git repository.

Bughue pushed a commit to branch rm-unpublish-270-once
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git


The following commit(s) were added to refs/heads/rm-unpublish-270-once by this 
push:
     new 2013c8b0d4 ci: one-shot unpublish of unreleased 2.7.0 Docker Hub tags
2013c8b0d4 is described below

commit 2013c8b0d489b41726594633b994c4e1b386dae3
Author: justabug <[email protected]>
AuthorDate: Sun Sep 13 22:41:11 2026 +0800

    ci: one-shot unpublish of unreleased 2.7.0 Docker Hub tags
---
 .github/workflows/unpublish-270-rc-docker.yml | 50 +++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/.github/workflows/unpublish-270-rc-docker.yml 
b/.github/workflows/unpublish-270-rc-docker.yml
new file mode 100644
index 0000000000..25f7ee041f
--- /dev/null
+++ b/.github/workflows/unpublish-270-rc-docker.yml
@@ -0,0 +1,50 @@
+name: Unpublish 2.7.0 RC Docker tags (one-shot)
+
+on:
+  push:
+    branches: [ rm-unpublish-270-once ]
+  workflow_dispatch:
+
+jobs:
+  restore-hub:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: docker/setup-buildx-action@v3
+      - name: Restore latest to 2.6.0 and delete unreleased 2.7.0 tags
+        env:
+          DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
+          DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
+          REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
+          REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
+        run: |
+          set -euo pipefail
+          USER="${DOCKERHUB_USER:-${REGISTRY_USERNAME:-}}"
+          PASS="${DOCKERHUB_TOKEN:-${REGISTRY_PASSWORD:-}}"
+          if [ -z "$USER" ] || [ -z "$PASS" ]; then
+            echo "No Docker Hub secrets in this workflow (DOCKERHUB_* or 
REGISTRY_*)."
+            exit 1
+          fi
+          echo "$PASS" | docker login -u "$USER" --password-stdin
+          docker buildx imagetools create \
+            -t apache/seata-server:latest \
+            apache/seata-server:2.6.0
+          echo "latest retargeted to 2.6.0"
+          TOKEN=$(curl -sS -H "Content-Type: application/json" \
+            -X POST \
+            -d "{\"username\":\"${USER}\",\"password\":\"${PASS}\"}" \
+            https://hub.docker.com/v2/users/login/ | jq -r .token)
+          if [ -z "$TOKEN" ] || [ "$TOKEN" = "null" ]; then
+            echo "Docker Hub login API did not return a token"
+            exit 1
+          fi
+          for tag in 2.7.0 2.7.0.jdk17 2.7.0.jdk21 2.7.0.jdk25; do
+            code=$(curl -sS -o /tmp/hub-del -w "%{http_code}" -X DELETE \
+              -H "Authorization: JWT ${TOKEN}" \
+              
"https://hub.docker.com/v2/repositories/apache/seata-server/tags/${tag}/";)
+            echo "DELETE ${tag} HTTP ${code}"
+            cat /tmp/hub-del; echo
+            case "$code" in
+              200|202|204) ;;
+              *) echo "unexpected status for ${tag}"; exit 1 ;;
+            esac
+          done
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to