Compare commits
1 Commits
main
...
claude/swe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b76f2413f2 |
4
.github/workflows/publish-server-image.yml
vendored
4
.github/workflows/publish-server-image.yml
vendored
@ -263,8 +263,8 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
owner_type="$(gh api "repos/${GITHUB_REPOSITORY}" --jq -r '.owner.type')"
|
owner_type="$(gh api "repos/${GITHUB_REPOSITORY}" --jq '.owner.type')"
|
||||||
private="$(gh api "repos/${GITHUB_REPOSITORY}" --jq -r '.private')"
|
private="$(gh api "repos/${GITHUB_REPOSITORY}" --jq '.private')"
|
||||||
if [[ "$owner_type" == "User" && "$private" == "true" ]]; then
|
if [[ "$owner_type" == "User" && "$private" == "true" ]]; then
|
||||||
echo "enabled=false" >> "$GITHUB_OUTPUT"
|
echo "enabled=false" >> "$GITHUB_OUTPUT"
|
||||||
echo "Skipping registry attestation: unavailable for private repositories on personal accounts."
|
echo "Skipping registry attestation: unavailable for private repositories on personal accounts."
|
||||||
|
|||||||
@ -43,6 +43,8 @@ describe("server image publish workflow", () => {
|
|||||||
expect(workflowText).toContain("actions/attest-build-provenance@");
|
expect(workflowText).toContain("actions/attest-build-provenance@");
|
||||||
expect(workflowText).not.toContain("github.repository_owner_type");
|
expect(workflowText).not.toContain("github.repository_owner_type");
|
||||||
expect(workflowText).toContain(`gh api "repos/\${GITHUB_REPOSITORY}"`);
|
expect(workflowText).toContain(`gh api "repos/\${GITHUB_REPOSITORY}"`);
|
||||||
|
// `gh api --jq` already prints raw strings; `--jq -r` takes `-r` as the filter and fails.
|
||||||
|
expect(workflowText).not.toContain("--jq -r");
|
||||||
expect(workflowText).toContain(".owner.type");
|
expect(workflowText).toContain(".owner.type");
|
||||||
expect(workflowText).toContain("if: steps.attestation.outputs.enabled == 'true'");
|
expect(workflowText).toContain("if: steps.attestation.outputs.enabled == 'true'");
|
||||||
expect(workflowText).toContain('[[ "$owner_type" == "User" && "$private" == "true" ]]');
|
expect(workflowText).toContain('[[ "$owner_type" == "User" && "$private" == "true" ]]');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user