Commit 65502f0d0e

65502f0d0e9b93308b325cc9125691f7888ea98d

parent: 19e2f8f6d6

Unsigned

Wraient <wraient.911@gmail.com> · 2025-02-13 18:08 UTC

chore: Fix ci/cd for manual triggering

Layout: unified · split

.github/workflows/ci-cd.yml +7 −1
@@ -7,7 +7,12 @@ on:
7 pull_request: 7 pull_request:
8 branches: 8 branches:
9 - main # Trigger on pull requests targeting the main branch 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
12jobs: 17jobs:
13 build: 18 build:
@@ -18,6 +23,7 @@ jobs:
18 uses: actions/checkout@v4 23 uses: actions/checkout@v4
19 with: 24 with:
20 fetch-depth: 0 # Fetch all history and tags 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 - name: Set up Go 28 - name: Set up Go
23 uses: actions/setup-go@v2 29 uses: actions/setup-go@v2