Skip to content

Commit 2e4fdf1

Browse files
committed
fix (cd): passed the secrets env var from Orchestrator to the subworkflows explicitly
Signed-off-by: rafaeljohn9 <rafaeljohb@gmail.com>
1 parent 8c8beb3 commit 2e4fdf1

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/publish-cargo.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
# .github/workflows/publish-cargo.yml
12
name: Publish Cargo
23

34
on:
45
workflow_call:
6+
inputs:
7+
cargo_token:
8+
required: true
9+
type: string
510
workflow_dispatch:
611

712
permissions:
@@ -16,4 +21,5 @@ jobs:
1621
- name: Install Rust
1722
uses: dtolnay/rust-toolchain@stable
1823

19-
- run: cargo publish --token "${{ secrets.CARGO_REGISTRY_TOKEN }}"
24+
- name: Publish to crates.io
25+
run: cargo publish --token "${{ inputs.cargo_token }}"

.github/workflows/publish-pypi.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Publish PyPI
22

33
on:
44
workflow_call:
5+
inputs:
6+
pypi_token:
7+
required: true
8+
type: string
59
workflow_dispatch:
610

711
jobs:
@@ -26,4 +30,4 @@ jobs:
2630
- name: Publish to PyPI
2731
uses: pypa/gh-action-pypi-publish@release/v1
2832
with:
29-
password: ${{ secrets.PYPI_API_TOKEN }}
33+
password: ${{ inputs.pypi_token }}

.github/workflows/release-tag.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
publish-pypi:
1313
uses: ./.github/workflows/publish-pypi.yml
1414
needs: build # ← Can run after build, even in parallel with cargo
15+
with:
16+
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
1517

1618
publish-cargo:
17-
uses: ./.github/workflows/publish-cargo.yml
19+
uses: ./.github/workflows/publish-cargo.yml
20+
with:
21+
cargo_token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)