updated github actions

This commit is contained in:
Jan Koppe 2021-10-30 09:40:55 +02:00
parent 5e9f8aeda0
commit 08d0a6c341
Signed by: thunfisch
GPG Key ID: BE935B0735A2129B
1 changed files with 13 additions and 2 deletions

View File

@ -4,6 +4,8 @@ on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
jobs:
@ -16,8 +18,15 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}
- name: Login to Github Packages
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
@ -27,5 +36,7 @@ jobs:
id: docker_build
uses: docker/build-push-action@v2
with:
push: ${{ github.ref == 'refs/heads/main' }}
tags: ghcr.io/chaoswest-tv/durchsage:latest
context: .
push: ${{ github.event_name != 'pull_request'}}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}