Skip to content

Commit f5754b3

Browse files
authored
Merge pull request #2034 from tiopex/disable-docker-push
Actions: disable docker push on PR action
2 parents c27d12b + 7a20a7f commit f5754b3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ jobs:
2626
with:
2727
context: .
2828
file: Dockerfile
29-
push: true
29+
push: ${{ github.event_name != 'pull_request' }}
3030
tags: ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest

.github/workflows/build-nightly.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ on:
1111
default: false
1212
type: boolean
1313
workflow_call:
14-
pull_request_target:
15-
types: [ review_requested, assigned ]
14+
pull_request:
15+
types: [ assigned ]
1616

1717
jobs:
1818
set-envs:
1919
if: (github.event_name != 'schedule') || (github.repository == 'ROCKNIX/distribution' && github.ref_name == 'next')
2020
environment:
21-
name: ${{ github.event_name == 'pull_request_target' && 'pr-approval' || 'auto' }}
21+
name: ${{ github.event_name == 'pull_request' && 'pr-approval' || 'auto' }}
2222
runs-on: ubuntu-24.04
2323
outputs:
2424
NIGHTLY: ${{ github.event_name == 'workflow_dispatch' && inputs.release == true && 'no' || 'yes' }}
@@ -34,7 +34,7 @@ jobs:
3434
OWNER: ${{ github.repository_owner }}
3535

3636
build-docker:
37-
if: (github.event_name != 'schedule') || (github.repository == 'ROCKNIX/distribution' && github.ref_name == 'next')
37+
if: github.event_name != 'schedule' || (github.repository == 'ROCKNIX/distribution' && github.ref_name == 'next')
3838
name: Docker
3939
needs: set-envs
4040
uses: ./.github/workflows/build-docker-image.yml
@@ -87,7 +87,7 @@ jobs:
8787
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
8888

8989
release-nightly:
90-
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.repository_owner == 'ROCKNIX' && needs.set-envs.outputs.NIGHTLY == 'yes' }}
90+
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' }}
9191
name: Release nightly
9292
needs: build-devices
9393
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)