Skip to content

Commit 6802842

Browse files
committed
Update to use the correct path
1 parent ebacaaa commit 6802842

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

.github/actions/linux-code-sign/action.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
target:
55
description: Target triple for the artifacts to sign.
66
required: true
7+
artifacts-dir:
8+
description: Absolute path to the directory containing built binaries to sign.
9+
required: true
710

811
runs:
912
using: composite
@@ -21,19 +24,21 @@ runs:
2124
run: |
2225
set -euo pipefail
2326
24-
dest="dist/${{ inputs.target }}"
27+
dest="${{ inputs.artifacts-dir }}"
2528
if [[ ! -d "$dest" ]]; then
2629
echo "Destination $dest does not exist"
2730
exit 1
2831
fi
2932
30-
shopt -s nullglob
31-
for artifact in "$dest"/*; do
32-
if [[ -f "$artifact" ]]; then
33-
cosign sign-blob \
34-
--yes \
35-
--output-signature "${artifact}.sig" \
36-
--output-certificate "${artifact}.pem" \
37-
"$artifact"
33+
for binary in codex codex-responses-api-proxy; do
34+
artifact="${dest}/${binary}"
35+
if [[ ! -f "$artifact" ]]; then
36+
echo "Binary $artifact not found"
37+
exit 1
3838
fi
39+
40+
cosign sign-blob \
41+
--yes \
42+
--bundle "${artifact}.sigstore" \
43+
"$artifact"
3944
done

.github/workflows/rust-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,12 @@ jobs:
107107
- name: Cargo build
108108
run: cargo build --target ${{ matrix.target }} --release --bin codex --bin codex-responses-api-proxy
109109

110-
- if: ${{ contains(matrix.target, 'linux') }}
110+
- if: ${{ contains(matrix.target, 'linux') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) }}
111111
name: Cosign Linux artifacts
112112
uses: ./.github/actions/linux-code-sign
113113
with:
114114
target: ${{ matrix.target }}
115+
artifacts-dir: ${{ github.workspace }}/codex-rs/target/${{ matrix.target }}/release
115116

116117
# - if: ${{ contains(matrix.target, 'windows') }}
117118
# name: Sign Windows binaries with Azure Trusted Signing

0 commit comments

Comments
 (0)