1515env :
1616 COMMIT_MSG : ${{ github.event.head_commit.message }}
1717 CACHE_REGISTRY : ghcr.io
18- CACHE_REPO : redkubes/otomi -console
18+ CACHE_REPO : linode/apl -console
1919 REPO : otomi/console
20- REG_GCR : eu.gcr.io
21- E2E_IMG : eu.gcr.io/otomi-cloud/otomi-e2e:latest
22- GIT_USER : redkubesbot
23- GIT_PASSWORD : ${{ secrets.GITHUB_TOKEN }}
2420 DOCKER_PASSWORD : ${{ secrets.DOCKERHUB_OTOMI_TOKEN }}
25- PERCY_TOKEN : ' ${{ secrets.PERCY_TOKEN }}'
26- GCLOUD_SERVICE_KEY : ' ${{ secrets.GCLOUD_SERVICE_KEY }}'
21+ DOCKER_USERNAME : ${{ vars.DOCKERHUB_USERNAME }}
22+ BOT_EMAIL : ${{ vars.BOT_EMAIL }}
23+ BOT_USERNAME : ${{ vars.BOT_USERNAME }}
24+ BOT_TOKEN : ${{ secrets.BOT_TOKEN }}
2725
2826jobs :
2927 build-test-push-release :
@@ -36,37 +34,36 @@ jobs:
3634 echo "Creating tag: $tag"
3735 echo "TAG=$tag" >> $GITHUB_ENV
3836 - name : Checkout
39- uses : actions/checkout@v3
40- with :
41- token : ${{ env.GIT_PASSWORD }}
37+ uses : actions/checkout@v4
4238 - name : CI tests, image build and push tag for main or branch
4339 uses : whoan/docker-build-with-cache-action@v6
4440 with :
45- username : redkubesbot
46- password : ' ${{ secrets.NPM_TOKEN }}'
41+ username : ${{ env.BOT_USERNAME}}
42+ password : ' ${{ env.BOT_TOKEN }}'
4743 registry : ${{ env.CACHE_REGISTRY }}
4844 image_name : ${{ env.CACHE_REPO }}
4945 image_tag : ${{ env.TAG }}
50- build_extra_args : ' --build-arg=NPM_TOKEN=${{ secrets.NPM_TOKEN }}'
5146 - name : Retag from cache and push
5247 run : |
53- docker login -u otomi -p $DOCKER_PASSWORD
48+ set -u
49+ docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
5450 docker tag $CACHE_REGISTRY/$CACHE_REPO:$TAG $REPO:$TAG
5551 docker push $REPO:$TAG
5652 - if : (startsWith(github.ref, 'refs/heads/releases/') || startsWith(github.ref, 'refs/heads/main'))&& startsWith(github.event.head_commit.message, 'chore(release)')
5753 name : Docker tag and push. Git tag and push.
5854 id : git_tag
5955 run : |
56+ set -u
6057 # docker tag $REPO:$TAG $REPO:latest
6158 # docker push $REPO:latest
6259 release_tag=v${COMMIT_MSG#* }
6360 echo tag=$release_tag >> $GITHUB_OUTPUT
6461 echo "Releasing $REPO:$release_tag"
6562 docker tag $REPO:$TAG $REPO:$release_tag
6663 docker push $REPO:$release_tag
67- git config --global user.email $GIT_USER@users.noreply.github.com
68- git config --global user.name $GIT_USER
69- echo "machine github.com login $GIT_USER password $GIT_PASSWORD " > ~/.netrc
64+ git config --global user.email $BOT_EMAIL
65+ git config --global user.name $BOT_USERNAME
66+ echo "machine github.com login $BOT_USERNAME password $BOT_TOKEN " > ~/.netrc
7067 git tag -am "$COMMIT_MSG" $release_tag && git push --follow-tags
7168 #Cut the CHANGELOG.md file up to the first occurence of the "### \[[0-9]*" (meaning three #, a space,a square bracket and any number after it)
7269 sed -n '/### \[[0-9]*/q;p' CHANGELOG.md > NEW_CHANGELOG.md
7976 tag : ${{ steps.git_tag.outputs.tag }}
8077 name : Release ${{ steps.git_tag.outputs.tag }}
8178 bodyFile : ' NEW_CHANGELOG.md'
79+
0 commit comments