git.delta.rocks / unique-network / refs/commits / b023ed9c7fff

difftreelog

fix xcm workflow

Konstantin Astakhov2022-09-09parent: #e30b14a.patch.diff
in: master

1 file changed

modified.github/workflows/xcm-testnet-build.ymldiffbeforeafterboth
85 - name: Install jq85 - name: Install jq
86 run: sudo apt install jq -y86 run: sudo apt install jq -y
8787
88 - name: Get autorization token from DOCKERHUB88 # - name: Get autorization token from DOCKERHUB
89 run: | 89 # run: |
90 # aquire token90 # # aquire token
91 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)91 # TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
92 export TOKEN=$TOKEN92 # export TOKEN=$TOKEN
9393
94 # Check POLKADOT version and build it if it doesn't exist in repository94 # Check POLKADOT version and build it if it doesn't exist in repository
95 - name: Generate ENV related extend Dockerfile file for POLKADOT95 - name: Generate ENV related extend Dockerfile file for POLKADOT
96 uses: cuchi/jinja2-action@v1.2.096 uses: cuchi/jinja2-action@v1.2.0
97 with:97 with:
102 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}102 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
103103
104 - name: Check if the dockerhub repository contains the needed version POLKADOT104 - name: Check if the dockerhub repository contains the needed version POLKADOT
105 run: | 105 run: |
106 # aquire token
107 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
106 # Get TAGS from DOCKERHUB repository108 export TOKEN=$TOKEN
109
110 # Get TAGS from DOCKERHUB POLKADOT repository
107 POLKADOT_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadot/tags/?page_size=100 | jq -r '."results"[]["name"]')111 POLKADOT_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadot/tags/?page_size=100 | jq -r '."results"[]["name"]')
108 # Show TAGS112 # Show TAGS
109 echo "POLKADOT TAGS:"113 echo "POLKADOT TAGS:"
110 echo $POLKADOT_TAGS114 echo $POLKADOT_TAGS
111 # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS115 # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS
112 if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ env.POLKADOT_BUILD_BRANCH }}"($|[[:space:]]) ]]; then116 if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ env.POLKADOT_BUILD_BRANCH }}"($|[[:space:]]) ]]; then
113 echo "Repository has needed POLKADOT version";117 echo "Repository has needed POLKADOT version";
114 docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}118 docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
115 else119 else
116 echo "Repository has not needed POLKADOT version, so build it";120 echo "Repository has not needed POLKADOT version, so build it";
117 cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml --tag uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }} .121 cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml --tag uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }} .
118 echo "Push needed POLKADOT version to the repository";122 echo "Push needed POLKADOT version to the repository";
119 docker push uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}123 docker push uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
120 fi124 fi
121 shell: bash125 shell: bash
122126
123 # Check ACALA version and build it if it doesn't exist in repository127 # Check ACALA version and build it if it doesn't exist in repository