Adjusted Dockerhub workflow

This commit is contained in:
krateng 2021-12-15 18:36:00 +01:00
parent 1303891a2d
commit 319519b7e2
1 changed files with 5 additions and 11 deletions

View File

@ -2,13 +2,8 @@ name: Publish Docker image to Dockerhub
on:
push:
branches:
- 'master'
tags:
- '*.*.*'
# don't trigger if just updating docs
paths-ignore:
- '**.md'
jobs:
push_to_registry:
@ -17,14 +12,14 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
@ -37,7 +32,7 @@ jobs:
type=semver,pattern={{version}}
flavor: |
latest=false
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
@ -45,4 +40,3 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}