diff --git a/.github/workflows/verify-plugin-export.yaml b/.github/workflows/verify-plugin-export.yaml index 4e62f35..4de74e0 100644 --- a/.github/workflows/verify-plugin-export.yaml +++ b/.github/workflows/verify-plugin-export.yaml @@ -1,6 +1,7 @@ name: Verify Plugin Export on: + pull_request: schedule: - cron: '17 3 * * *' workflow_dispatch: @@ -28,7 +29,7 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: - ref: ${{ inputs.branch || github.ref_name }} + ref: ${{ inputs.branch || '' }} - name: Set up Node uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 @@ -75,7 +76,7 @@ jobs: - name: Checkout rhdh-cli uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: - ref: ${{ inputs.branch || github.ref_name }} + ref: ${{ inputs.branch || '' }} path: rhdh-cli - name: Set up Node @@ -100,7 +101,10 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: repository: redhat-developer/rhdh-plugin-export-overlays - ref: ${{ inputs.branch || github.ref_name }} + # For manual dispatched runs, use the input variable. + # For PRs, github.base_ref is the target branch (e.g. main or release-1.10). + # For schedule jobs where base_ref is empty, it falls back to github.ref_name. + ref: ${{ inputs.branch || github.base_ref || github.ref_name }} path: overlays - name: Clone source repo and run exports