From 6c734dc14feda83838ce4e59212715e933feaf41 Mon Sep 17 00:00:00 2001 From: Minims Date: Sat, 5 Nov 2022 12:03:40 +0100 Subject: [PATCH] Update docker_hub.yaml --- .github/workflows/docker-hub.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 7907a87..d869f17 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -1,39 +1,43 @@ name: Push to Docker.io -on: workflow_dispatch +on: + workflow_dispatch: + create: + tags: + - .* jobs: install: name: Build & Deploy in docker.io - runs-on: [ ubuntu-latest ] + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - # Production versions + - name: GitHub Tag Name example + run: | + echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" + echo "Tag name from github.ref_name: ${{ github.ref_name }}" + + # Production versions - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: somfyProtect2Mqtt/ platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: | minims/somfyprotect2mqtt:latest - + minims/somfyprotect2mqtt:${{ github.ref_name }}