nginx-proxy-auto-docker/.github/workflows/docker_push.yml
2022-03-05 11:19:23 +01:00

36 lines
No EOL
886 B
YAML

name: Publish Docker image
on:
workflow_dispatch:
push:
branches:
- 'master'
tags:
- 'v*'
jobs:
docker_push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: seitenwerke/nginx-proxy
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push debian image to Docker Hub
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}