Skip to content

Commit 9ed07fd

Browse files
committed
fix(pipeline): resolve secret inheritance issues in GA
Signed-off-by: Ramiz Polic <[email protected]>
1 parent 9838d6f commit 9ed07fd

11 files changed

+61
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ jobs:
116116
with:
117117
image_repo: ghcr.io/agntcy
118118
image_tag: ${{ github.sha }}
119+
secrets: inherit
119120

120121
test:
121122
name: Test
@@ -125,6 +126,7 @@ jobs:
125126
with:
126127
image_repo: ghcr.io/agntcy
127128
image_tag: ${{ github.sha }}
129+
secrets: inherit
128130

129131
release:
130132
name: Release
@@ -135,6 +137,7 @@ jobs:
135137
with:
136138
image_repo: ghcr.io/agntcy
137139
release_tag: ${{ github.ref_name }}
140+
secrets: inherit
138141

139142
integration:
140143
name: Run integration tests

.github/workflows/lint-pr-title.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Lint and comment PR Title
22

33
on:
44
workflow_call:
5+
secrets:
6+
GITHUB_TOKEN:
7+
description: "GitHub token for PR operations"
8+
required: true
59

610
permissions:
711
contents: read

.github/workflows/pr.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
validate_pr_title:
2020
name: Validate PR Title
2121
uses: ./.github/workflows/lint-pr-title.yaml
22+
secrets: inherit
2223

2324
label:
2425
name: Label

.github/workflows/reusable-brew-update.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
name: Brew formula update
55

6-
description: |
7-
This workflow automatize the brew formula file update process with replacing the version number to the latest,
8-
recalculate all hash for the binaries and create a new PR with the changes.
6+
# This workflow automatize the brew formula file update process with replacing the version number to the latest,
7+
# recalculate all hash for the binaries and create a new PR with the changes.
98

109
on:
1110
workflow_call:
@@ -18,6 +17,10 @@ on:
1817
type: boolean
1918
default: false
2019
description: Run even if there are no changes.
20+
secrets:
21+
GITHUB_TOKEN:
22+
description: "GitHub token for repository operations and PR creation"
23+
required: true
2124
workflow_dispatch:
2225
inputs:
2326
create-pr:

.github/workflows/reusable-build.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
type: boolean
2020
default: false
2121
description: "Whether to push the image to the registry."
22+
secrets:
23+
GITHUB_TOKEN:
24+
description: "GitHub token for accessing the container registry"
25+
required: true
2226

2327
jobs:
2428
prepare:

.github/workflows/reusable-release-sdk.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ on:
2828
type: boolean
2929
description: "Make a python SDK release."
3030
default: false
31+
secrets:
32+
PYPI_API_TOKEN:
33+
description: "PyPI API token for publishing Python SDK"
34+
required: false
35+
NPMJS_TOKEN:
36+
description: "NPM.js token for publishing JavaScript SDK"
37+
required: false
3138

3239
permissions:
3340
contents: read
@@ -37,8 +44,6 @@ jobs:
3744
name: Python
3845
if: ${{ inputs.python-release == true || inputs.python-release == 'true' }}
3946
runs-on: ubuntu-latest
40-
env:
41-
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
4247
steps:
4348
- name: Checkout code
4449
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -59,15 +64,15 @@ jobs:
5964
task sdk:build:python
6065
6166
- name: Publish the Python SDK
67+
env:
68+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
6269
run: |
6370
task sdk:release:python
6471
6572
javascript:
6673
name: JavaScript
6774
if: ${{ inputs.javascript-release == true || inputs.javascript-release == 'true' }}
6875
runs-on: ubuntu-latest
69-
env:
70-
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
7176
steps:
7277
- name: Checkout code
7378
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -96,5 +101,7 @@ jobs:
96101
task sdk:build:javascript
97102
98103
- name: Publish the Javascript SDK
104+
env:
105+
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
99106
run: |
100107
task sdk:release:javascript

.github/workflows/reusable-release.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ on:
1414
required: true
1515
type: string
1616
description: "Release tag for all components."
17+
secrets:
18+
GITHUB_TOKEN:
19+
description: "GitHub token for repository operations and releases"
20+
required: true
21+
PYPI_API_TOKEN:
22+
description: "PyPI API token for publishing Python SDK"
23+
required: false
24+
NPMJS_TOKEN:
25+
description: "NPM.js token for publishing JavaScript SDK"
26+
required: false
1727

1828
jobs:
1929
image:
@@ -23,6 +33,7 @@ jobs:
2333
image_repo: ${{ inputs.image_repo }}
2434
image_tag: ${{ inputs.release_tag }}
2535
push: true
36+
secrets: inherit
2637

2738
chart:
2839
name: Helm chart
@@ -104,6 +115,7 @@ jobs:
104115
with:
105116
javascript-release: true
106117
python-release: true
118+
secrets: inherit
107119

108120
release:
109121
name: Release
@@ -176,3 +188,4 @@ jobs:
176188
with:
177189
create-pr: true
178190
run-without-diff: false
191+
secrets: inherit

.github/workflows/reusable-test-e2e.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
required: true
1515
type: string
1616
description: 'Image tag to use.'
17+
secrets:
18+
GITHUB_TOKEN:
19+
description: "GitHub token for accessing the container registry"
20+
required: true
1721

1822
jobs:
1923
e2e:

.github/workflows/reusable-test-sdk.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
required: true
1515
type: string
1616
description: 'Image tag to use.'
17+
secrets:
18+
GITHUB_TOKEN:
19+
description: "GitHub token for accessing the container registry"
20+
required: true
1721

1822
permissions:
1923
id-token: write

.github/workflows/reusable-test-spire.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
required: true
1515
type: string
1616
description: 'Image tag to use.'
17+
secrets:
18+
GITHUB_TOKEN:
19+
description: "GitHub token for accessing the container registry"
20+
required: true
1721

1822
permissions:
1923
id-token: write

0 commit comments

Comments
 (0)