From 76e1b9122f122f681f93bcd112129dba6c73c6e5 Mon Sep 17 00:00:00 2001 From: André Oliveira <37463445+SpecialAro@users.noreply.github.com> Date: Fri, 13 May 2022 18:11:37 +0100 Subject: Update build and publish action (#34) --- .github/workflows/docker.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to '.github/workflows/docker.yml') diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3448d34..ea0f386 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,6 +4,8 @@ on: push: branches: - 'main' + tags: + - 'v*' jobs: docker: @@ -19,10 +21,11 @@ jobs: with: # list of Docker images to use as base name for tags images: | + ${{ github.repository }} ghcr.io/${{ github.repository }} # generate Docker tags based on the following events/attributes tags: | - type=ref,event=branch + latest type=semver,pattern={{version}} - name: Set up QEMU @@ -37,6 +40,12 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v3 @@ -49,3 +58,4 @@ jobs: #push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + push: true -- cgit v1.2.3-54-g00ecf