Actions: disable docker push on PR action

This commit is contained in:
tiopex
2025-11-18 07:50:36 +01:00
parent c27d12bf20
commit 7a20a7f754
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -26,5 +26,5 @@ jobs:
with:
context: .
file: Dockerfile
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest
+5 -5
View File
@@ -11,14 +11,14 @@ on:
default: false
type: boolean
workflow_call:
pull_request_target:
types: [ review_requested, assigned ]
pull_request:
types: [ assigned ]
jobs:
set-envs:
if: (github.event_name != 'schedule') || (github.repository == 'ROCKNIX/distribution' && github.ref_name == 'next')
environment:
name: ${{ github.event_name == 'pull_request_target' && 'pr-approval' || 'auto' }}
name: ${{ github.event_name == 'pull_request' && 'pr-approval' || 'auto' }}
runs-on: ubuntu-24.04
outputs:
NIGHTLY: ${{ github.event_name == 'workflow_dispatch' && inputs.release == true && 'no' || 'yes' }}
@@ -34,7 +34,7 @@ jobs:
OWNER: ${{ github.repository_owner }}
build-docker:
if: (github.event_name != 'schedule') || (github.repository == 'ROCKNIX/distribution' && github.ref_name == 'next')
if: github.event_name != 'schedule' || (github.repository == 'ROCKNIX/distribution' && github.ref_name == 'next')
name: Docker
needs: set-envs
uses: ./.github/workflows/build-docker-image.yml
@@ -87,7 +87,7 @@ jobs:
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
release-nightly:
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.repository_owner == 'ROCKNIX' && needs.set-envs.outputs.NIGHTLY == 'yes' }}
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.repository_owner == 'ROCKNIX' && needs.set-envs.outputs.NIGHTLY == 'yes' && github.event_name != 'pull_request' }}
name: Release nightly
needs: build-devices
runs-on: ubuntu-24.04