Skip to content

Commit f24df7b

Browse files
authored
chore: allow docker_publish to skip tests and bump workflow version (#149)
1 parent d91693b commit f24df7b

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ on:
55
branches:
66
- '**'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
lint_test:
10-
uses: babylonlabs-io/.github/.github/workflows/[email protected].3
13+
uses: babylonlabs-io/.github/.github/workflows/[email protected].4
1114
with:
1215
go-version: '1.25'
1316
go-lint-version: 'v2.4.0'
@@ -19,7 +22,7 @@ jobs:
1922
gosec-args: "-exclude-generated -exclude-dir=itest -exclude-dir=testutil -exclude-dir=covenant-signer ./..."
2023

2124
docker_pipeline:
22-
uses: babylonlabs-io/.github/.github/workflows/[email protected].3
25+
uses: babylonlabs-io/.github/.github/workflows/[email protected].4
2326
secrets: inherit
2427
with:
2528
publish: false
@@ -47,7 +50,7 @@ jobs:
4750
run: gosec ./...
4851

4952
docker_pipeline_covenant_signer:
50-
uses: babylonlabs-io/.github/.github/workflows/[email protected].3
53+
uses: babylonlabs-io/.github/.github/workflows/[email protected].4
5154
secrets: inherit
5255
with:
5356
publish: false

.github/workflows/publish.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ on:
88
tags:
99
- '*'
1010
workflow_dispatch:
11+
inputs:
12+
skip-lint-test:
13+
description: "Skip tests"
14+
required: false
15+
type: boolean
16+
default: false
17+
18+
permissions:
19+
contents: read
1120

1221
jobs:
1322
lint_test:
14-
uses: babylonlabs-io/.github/.github/workflows/[email protected]
23+
uses: babylonlabs-io/.github/.github/workflows/[email protected]
24+
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs['skip-lint-test'] == true) }}
1525
with:
1626
go-version: '1.25'
1727
go-lint-version: 'v2.4.0'
@@ -23,8 +33,14 @@ jobs:
2333
gosec-args: "-exclude-generated -exclude-dir=itest -exclude-dir=testutil -exclude-dir=covenant-signer ./..."
2434

2535
docker_pipeline:
36+
# Always evaluate, but only proceed if:
37+
# - skip is enabled, or lint_test succeeded (normal path)
38+
if: ${{ always() && (
39+
(github.event_name == 'workflow_dispatch' && inputs['skip-lint-test'] == true) ||
40+
needs.lint_test.result == 'success'
41+
)}}
2642
needs: ["lint_test"]
27-
uses: babylonlabs-io/.github/.github/workflows/[email protected].3
43+
uses: babylonlabs-io/.github/.github/workflows/[email protected].4
2844
secrets: inherit
2945
with:
3046
publish: true
@@ -58,7 +74,7 @@ jobs:
5874

5975
docker_pipeline_covenant_signer:
6076
needs: ["go_sec_covenant_signer"]
61-
uses: babylonlabs-io/.github/.github/workflows/[email protected].3
77+
uses: babylonlabs-io/.github/.github/workflows/[email protected].4
6278
secrets: inherit
6379
with:
6480
publish: true

0 commit comments

Comments
 (0)