From 93eba111d89cc1969a94611f6da372f2b5907598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Fri, 15 Jul 2022 18:02:18 +0200 Subject: [PATCH] feat: Publish releases to new docker hub account (#418) * feat: Publish releases to new docker hub account * feat: added latest tag for docker hub --- .github/workflows/gaia.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gaia.yml b/.github/workflows/gaia.yml index d62bf729..f099b8f9 100644 --- a/.github/workflows/gaia.yml +++ b/.github/workflows/gaia.yml @@ -60,12 +60,14 @@ jobs: echo "context: $OUTPUT1" echo "tags: $OUTPUT2" echo "Github ref: $OUTPUT3" - echo "Will push variable: $OUTPUT4" + echo "Will release push variable: $OUTPUT4" + echo "Will latest-dev push variable: $OUTPUT5" env: OUTPUT1: ${{ matrix.context }} OUTPUT2: ${{ needs.semantic-release.outputs.new_release_version }} OUTPUT3: ${{ github.ref }} ":" ${{ github.ref }} - OUTPUT4: ${{ github.ref != 'refs/heads/master' || needs.semantic-release.outputs.new_release_version != '' }} + OUTPUT4: ${{ needs.semantic-release.outputs.new_release_version != '' }} + OUTPUT5: ${{ github.ref == 'refs/heads/master' }} - name: Build/Tag/Push Image - Dockerhub stacksnetwork - latest-dev uses: docker/build-push-action@v3 @@ -86,3 +88,12 @@ jobs: # push: false # Only push as tag "latest-dev" when new code on main branch push: ${{ github.ref == 'refs/heads/master' }} + + - name: Build/Tag/Push Image - Dockerhub stacksnetwork - new release + uses: docker/build-push-action@v3 + if: ${{ needs.semantic-release.outputs.new_release_version != '' }} + with: + context: "{{defaultContext}}:${{ matrix.context }}" + tags: ${{ env.IMAGE_NAME }}:${{ needs.semantic-release.outputs.new_release_version }},latest + push: ${{ needs.semantic-release.outputs.new_release_version != '' }} +