Use github.ref to check for main branch, not github.base_ref

This commit is contained in:
Morten Lied Johansen 2024-10-02 20:41:11 +02:00
parent f5f2e0984b
commit 970982db30
No known key found for this signature in database
GPG key ID: 8DC6DECB15005221

View file

@ -25,7 +25,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Packages Docker Registry
if: github.base_ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
@ -50,6 +50,6 @@ jobs:
GIT_BRANCH=${{ github.ref }}
BUILD_DATE=${{ steps.constants.outputs.build_date }}
file: ./Dockerfile
push: ${{ github.base_ref == 'refs/heads/main' }}
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}