diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index 1904a03..8c508d9 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -4,6 +4,11 @@ on: push: pull_request: workflow_dispatch: + inputs: + checkout-ref: + description: "The branch, tag or SHA to checkout. See actions/checkout 'ref'." + required: false + type: string concurrency: group: "Build Project: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" @@ -14,6 +19,11 @@ jobs: validate-gradle-wrapper: runs-on: ubuntu-latest steps: + - name: Checkout the repo + uses: actions/checkout@v4 + with: + ref: ${{ inputs.checkout-ref || github.ref }} + - name: Validate Gradle Wrapper uses: gradle/actions/wrapper-validation@v3 @@ -30,7 +40,7 @@ jobs: - name: Checkout the repo uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.ref }} + ref: ${{ inputs.checkout-ref || github.ref }} - name: Setup JDK uses: actions/setup-java@v4