From dcb943fa08fe13ac7cd4e744744738520a4c0605 Mon Sep 17 00:00:00 2001
From: Chevdor <chevdor@users.noreply.github.com>
Date: Thu, 31 Mar 2022 18:20:47 +0200
Subject: [PATCH] Fix target docker hub org (#1125)

---
 .../workflows/release-10_docker-manual.yml    | 22 ++++++++++---------
 .../.github/workflows/release-10_docker.yml   | 22 ++++++++++---------
 2 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/cumulus/.github/workflows/release-10_docker-manual.yml b/cumulus/.github/workflows/release-10_docker-manual.yml
index f6a7604ac8f..142f456805a 100644
--- a/cumulus/.github/workflows/release-10_docker-manual.yml
+++ b/cumulus/.github/workflows/release-10_docker-manual.yml
@@ -72,8 +72,9 @@ jobs:
       - name: Build injected image
         env:
           DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
+          DOCKERHUB_ORG: parity
         run: |
-          export OWNER=$DOCKERHUB_USERNAME
+          export OWNER=$DOCKERHUB_ORG
           mkdir -p target/release
           cp -f $BINARY* target/release/
           ./docker/scripts/build-injected-image.sh
@@ -87,9 +88,10 @@ jobs:
       - name: Tag and Publish
         env:
           DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
+          DOCKERHUB_ORG: parity
         run: |
-          docker run --pull never --rm $DOCKERHUB_USERNAME/$BINARY --version
-          VERSION=$(docker run --pull never --rm $DOCKERHUB_USERNAME/$BINARY --version | awk '{ print $2 }' )
+          docker run --pull never --rm $DOCKERHUB_ORG/$BINARY --version
+          VERSION=$(docker run --pull never --rm $DOCKERHUB_ORG/$BINARY --version | awk '{ print $2 }' )
           SEMVER=$( echo $VERSION | cut -f1 -d- )
           GITREF=$( echo $VERSION | cut -f2 -d- )
           PRE=${{ github.event.inputs.prerelease }}
@@ -107,15 +109,15 @@ jobs:
           echo "PRE_STR=$PRE_STR"
           echo "TAG=$TAG"
 
-          docker tag $DOCKERHUB_USERNAME/$BINARY $DOCKERHUB_USERNAME/$BINARY:$TAG
-          docker push $DOCKERHUB_USERNAME/$BINARY:$TAG
+          docker tag $DOCKERHUB_ORG/$BINARY $DOCKERHUB_ORG/$BINARY:$TAG
+          docker push $DOCKERHUB_ORG/$BINARY:$TAG
 
           if [[ $PRE != "true" ]]; then
-            docker tag $DOCKERHUB_USERNAME/$BINARY $DOCKERHUB_USERNAME/$BINARY:latest
-            docker tag $DOCKERHUB_USERNAME/$BINARY $DOCKERHUB_USERNAME/$BINARY:$SEMVER
+            docker tag $DOCKERHUB_ORG/$BINARY $DOCKERHUB_ORG/$BINARY:latest
+            docker tag $DOCKERHUB_ORG/$BINARY $DOCKERHUB_ORG/$BINARY:$SEMVER
 
-            docker push $DOCKERHUB_USERNAME/$BINARY:latest
-            docker push $DOCKERHUB_USERNAME/$BINARY:$SEMVER
+            docker push $DOCKERHUB_ORG/$BINARY:latest
+            docker push $DOCKERHUB_ORG/$BINARY:$SEMVER
           fi
 
-          docker images | grep $DOCKERHUB_USERNAME/$BINARY
+          docker images | grep $DOCKERHUB_ORG/$BINARY
diff --git a/cumulus/.github/workflows/release-10_docker.yml b/cumulus/.github/workflows/release-10_docker.yml
index 361b36166b5..4d07cad2909 100644
--- a/cumulus/.github/workflows/release-10_docker.yml
+++ b/cumulus/.github/workflows/release-10_docker.yml
@@ -73,8 +73,9 @@ jobs:
       - name: Build injected image
         env:
           DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
+          DOCKERHUB_ORG: parity
         run: |
-          export OWNER=$DOCKERHUB_USERNAME
+          export OWNER=$DOCKERHUB_ORG
           mkdir -p target/release
           cp -f $BINARY* target/release/
           ./docker/scripts/build-injected-image.sh
@@ -88,9 +89,10 @@ jobs:
       - name: Tag and Publish
         env:
           DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
+          DOCKERHUB_ORG: parity
         run: |
-          docker run --pull never --rm $DOCKERHUB_USERNAME/$BINARY --version
-          VERSION=$(docker run --pull never --rm $DOCKERHUB_USERNAME/$BINARY --version | awk '{ print $2 }' )
+          docker run --pull never --rm $DOCKERHUB_ORG/$BINARY --version
+          VERSION=$(docker run --pull never --rm $DOCKERHUB_ORG/$BINARY --version | awk '{ print $2 }' )
           SEMVER=$( echo $VERSION | cut -f1 -d- )
           GITREF=$( echo $VERSION | cut -f2 -d- )
           PRE=${{ github.event.release.prerelease }}
@@ -108,15 +110,15 @@ jobs:
           echo "PRE_STR=$PRE_STR"
           echo "TAG=$TAG"
 
-          docker tag $DOCKERHUB_USERNAME/$BINARY $DOCKERHUB_USERNAME/$BINARY:$TAG
-          docker push $DOCKERHUB_USERNAME/$BINARY:$TAG
+          docker tag $DOCKERHUB_ORG/$BINARY $DOCKERHUB_ORG/$BINARY:$TAG
+          docker push $DOCKERHUB_ORG/$BINARY:$TAG
 
           if [[ $PRE != "true" ]]; then
-            docker tag $DOCKERHUB_USERNAME/$BINARY $DOCKERHUB_USERNAME/$BINARY:latest
-            docker tag $DOCKERHUB_USERNAME/$BINARY $DOCKERHUB_USERNAME/$BINARY:$SEMVER
+            docker tag $DOCKERHUB_ORG/$BINARY $DOCKERHUB_ORG/$BINARY:latest
+            docker tag $DOCKERHUB_ORG/$BINARY $DOCKERHUB_ORG/$BINARY:$SEMVER
 
-            docker push $DOCKERHUB_USERNAME/$BINARY:latest
-            docker push $DOCKERHUB_USERNAME/$BINARY:$SEMVER
+            docker push $DOCKERHUB_ORG/$BINARY:latest
+            docker push $DOCKERHUB_ORG/$BINARY:$SEMVER
           fi
 
-          docker images | grep $DOCKERHUB_USERNAME/$BINARY
+          docker images | grep $DOCKERHUB_ORG/$BINARY
-- 
GitLab