From dd4f84aebd333afec3c1c61dee6f2b2fc74761d0 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Tue, 16 Dec 2025 12:17:22 +0000 Subject: [PATCH] Add workflow prepare script hook to all jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow repos to optionally run a ./workflow-prepare.sh script after checkout to handle any pre-build setup like downloading dependencies or generating files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/go-pr.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/go-pr.yaml b/.github/workflows/go-pr.yaml index 5fbac77..4a7db66 100644 --- a/.github/workflows/go-pr.yaml +++ b/.github/workflows/go-pr.yaml @@ -30,6 +30,13 @@ jobs: with: fetch-depth: 0 + - name: Run workflow prepare script + run: | + if [ -f "./workflow-prepare.sh" ]; then + chmod +x ./workflow-prepare.sh + ./workflow-prepare.sh + fi + - name: Setup Go uses: actions/setup-go@v5 with: @@ -54,6 +61,13 @@ jobs: with: fetch-depth: 0 + - name: Run workflow prepare script + run: | + if [ -f "./workflow-prepare.sh" ]; then + chmod +x ./workflow-prepare.sh + ./workflow-prepare.sh + fi + - name: Setup Go uses: actions/setup-go@v5 with: @@ -105,6 +119,13 @@ jobs: with: fetch-depth: 0 + - name: Run workflow prepare script + run: | + if [ -f "./workflow-prepare.sh" ]; then + chmod +x ./workflow-prepare.sh + ./workflow-prepare.sh + fi + - name: Setup Go uses: actions/setup-go@v5 with: @@ -135,6 +156,13 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Run workflow prepare script + run: | + if [ -f "./workflow-prepare.sh" ]; then + chmod +x ./workflow-prepare.sh + ./workflow-prepare.sh + fi + - name: Setup Go uses: actions/setup-go@v5 with: @@ -163,6 +191,13 @@ jobs: with: fetch-depth: 0 + - name: Run workflow prepare script + run: | + if [ -f "./workflow-prepare.sh" ]; then + chmod +x ./workflow-prepare.sh + ./workflow-prepare.sh + fi + - name: Setup Go uses: actions/setup-go@v5 with: