Skip to content

Add commit behavior note #650

Add commit behavior note

Add commit behavior note #650

Workflow file for this run

name: docker
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
types:
- opened
- synchronize
- reopened
- labeled
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: namoscato/github-action-tinify
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}
type=edge
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'build docker')
uses: docker/#-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'build docker') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}