From 519a0f0688d8740c7944bdb7986a540cbf7e3917 Mon Sep 17 00:00:00 2001
From: Chevdor <chevdor@users.noreply.github.com>
Date: Mon, 18 Sep 2023 11:56:35 +0200
Subject: [PATCH] Replace secrets with the new ones (#1564)

In the monorepo, secrets used in the various previous repos have been
renamed into:
- `CUMULUS_DOCKERHUB_USERNAME`
- `CUMULUS_DOCKERHUB_TOKEN`
- `POLKADOT_DOCKERHUB_USERNAME`
- `POLKADOT_DOCKERHUB_TOKEN`

This PR makes those changes and remove one of the GHW that has now been
updated for the monorepo.
---
 .../workflows/release-50_publish-docker.yml   |  8 ++--
 .../release-50_publish-docker-release.yml     | 44 -------------------
 2 files changed, 4 insertions(+), 48 deletions(-)
 delete mode 100644 polkadot/.github/workflows/release-50_publish-docker-release.yml

diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml
index 5cfe53e641d..535f54abc68 100644
--- a/.github/workflows/release-50_publish-docker.yml
+++ b/.github/workflows/release-50_publish-docker.yml
@@ -198,8 +198,8 @@ jobs:
       - name: Login to Dockerhub
         uses: docker/login-action@v2
         with:
-          username: ${{ secrets.DOCKERHUB_USERNAME }}
-          password: ${{ secrets.DOCKERHUB_TOKEN }}
+          username: ${{ secrets.CUMULUS_DOCKERHUB_USERNAME }}
+          password: ${{ secrets.CUMULUS_DOCKERHUB_TOKEN }}
 
       - name: Push Container image for ${{ env.BINARY }}
         id: docker_push
@@ -255,8 +255,8 @@ jobs:
       - name: Login to Docker Hub
         uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
         with:
-          username: ${{ secrets.DOCKERHUB_USERNAME }}
-          password: ${{ secrets.DOCKERHUB_TOKEN }}
+          username: ${{ secrets.POLKADOT_DOCKERHUB_USERNAME }}
+          password: ${{ secrets.POLKADOT_DOCKERHUB_TOKEN }}
 
       - name: Fetch values
         id: fetch-data
diff --git a/polkadot/.github/workflows/release-50_publish-docker-release.yml b/polkadot/.github/workflows/release-50_publish-docker-release.yml
deleted file mode 100644
index 81e5caa718f..00000000000
--- a/polkadot/.github/workflows/release-50_publish-docker-release.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-name: Release - Publish Docker image for new releases
-
-on:
-  release:
-    types:
-      - published
-
-jobs:
-  main:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Checkout sources
-        uses: actions/checkout@v3
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@95cb08cb2672c73d4ffd2f422e6d11953d2a9c70 # v2.1.0
-      - name: Cache Docker layers
-        uses: actions/cache@v3
-        with:
-         path: /tmp/.buildx-cache
-         key: ${{ runner.os }}-buildx-${{ github.sha }}
-         restore-keys: |
-           ${{ runner.os }}-buildx-
-      - name: Login to Dockerhub
-        uses: docker/login-action@v2
-        with:
-          username: ${{ secrets.DOCKERHUB_USERNAME }}
-          password: ${{ secrets.DOCKERHUB_TOKEN }}
-      - name: Build and push
-        id:   docker_build
-        uses: docker/build-push-action@v4
-        with:
-          push: true
-          file: scripts/ci/dockerfiles/polkadot/polkadot_injected_debian.Dockerfile
-          tags: |
-            parity/polkadot:latest
-            parity/polkadot:${{ github.event.release.tag_name }}
-          build-args: |
-            POLKADOT_VERSION=${{ github.event.release.tag_name }}
-            VCS_REF=${{ github.ref }}
-            BUILD_DATE=${{ github.event.release.published_at }}
-          cache-from: type=local,src=/tmp/.buildx-cache
-          cache-to: type=local,dest=/tmp/.buildx-cache
-      - name: Image digest
-        run: echo ${{ steps.docker_build.outputs.digest }}
-- 
GitLab