Commit 65502f0d0e
Unsigned
Layout: unified · split
.github/workflows/ci-cd.yml +7 −1
| @@ -7,7 +7,12 @@ on: | ||
| 7 | 7 | pull_request: |
| 8 | 8 | branches: |
| 9 | 9 | - main # Trigger on pull requests targeting the main branch |
| 10 | workflow_dispatch: # Allows manual triggering | |
| 10 | workflow_dispatch: | |
| 11 | inputs: | |
| 12 | pr_number: | |
| 13 | description: 'Pull Request Number' | |
| 14 | required: false | |
| 15 | type: string | |
| 11 | 16 | |
| 12 | 17 | jobs: |
| 13 | 18 | build: |
| @@ -18,6 +23,7 @@ jobs: | ||
| 18 | 23 | uses: actions/checkout@v4 |
| 19 | 24 | with: |
| 20 | 25 | fetch-depth: 0 # Fetch all history and tags |
| 26 | ref: ${{ github.event.pull_request.head.sha || (github.event.inputs.pr_number && format('refs/pull/{0}/head', github.event.inputs.pr_number)) || github.sha }} | |
| 21 | 27 | |
| 22 | 28 | - name: Set up Go |
| 23 | 29 | uses: actions/setup-go@v2 |