diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index de7c2471c1..7d4f9ccb12 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/build-nightly.yml b/.github/workflows/build-nightly.yml index 6ea366ddd6..f0861bd371 100644 --- a/.github/workflows/build-nightly.yml +++ b/.github/workflows/build-nightly.yml @@ -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