on build on push to main branch
@@ -8,12 +8,9 @@ name: Publish Docker image
on:
push:
branches:
- - '**'
+ - main
tags:
- '*.*.*'
- pull_request:
- branches:
- - 'main'
env:
REGISTRY: ghcr.io
@@ -31,7 +28,6 @@ jobs:
uses: actions/checkout@v2
- name: Log in to the Container registry
- if: github.event_name != 'pull_request'
uses: docker/login-action@v1.10.0
with:
registry: ${{ env.REGISTRY }}
@@ -58,6 +54,6 @@ jobs:
uses: docker/build-push-action@v2.6.1
with:
context: .
- push: ${{ github.event_name != 'pull_request' }}
+ push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
\ No newline at end of file
