Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/private-ca-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
gh issue comment "${{ github.event.issue.number }}" --body "Skipped by @BrianInAz; no private-CA package was built."
gh issue close "${{ github.event.issue.number }}"
gh issue comment "${{ github.event.issue.number }}" --repo "${GITHUB_REPOSITORY}" --body "Skipped by @BrianInAz; no private-CA package was built."
gh issue close "${{ github.event.issue.number }}" --repo "${GITHUB_REPOSITORY}"

built:
if: >-
Expand All @@ -112,9 +112,9 @@ jobs:
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
set -euo pipefail
body="$(gh issue view "${ISSUE_NUMBER}" --json body --jq .body)"
body="$(gh issue view "${ISSUE_NUMBER}" --repo "${GITHUB_REPOSITORY}" --json body --jq .body)"
grep -Eq '^<!-- buzz-private-ca-release tag=(desktop-)?v[0-9]+\.[0-9]+\.[0-9]+ source_sha=[0-9a-f]{40} patch_sha=[0-9a-f]{40} patch_status=clean -->$' <<<"${body}" || { echo "not a clean monitor-created ticket" >&2; exit 1; }
gh issue comment "${ISSUE_NUMBER}" --body "Built by @BrianInAz on the approved Apple Silicon Mac. Record the immutable artifact, checksum, private WSS gate, and local acceptance evidence before adding \`accepted\`."
gh issue comment "${ISSUE_NUMBER}" --repo "${GITHUB_REPOSITORY}" --body "Built by @BrianInAz on the approved Apple Silicon Mac. Record the immutable artifact, checksum, private WSS gate, and local acceptance evidence before adding \`accepted\`."

accepted:
if: >-
Expand All @@ -131,12 +131,12 @@ jobs:
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
set -euo pipefail
body="$(gh issue view "${ISSUE_NUMBER}" --json body --jq .body)"
body="$(gh issue view "${ISSUE_NUMBER}" --repo "${GITHUB_REPOSITORY}" --json body --jq .body)"
grep -Eq '^<!-- buzz-private-ca-release tag=(desktop-)?v[0-9]+\.[0-9]+\.[0-9]+ source_sha=[0-9a-f]{40} patch_sha=[0-9a-f]{40} patch_status=clean -->$' <<<"${body}" || { echo "not a clean monitor-created ticket" >&2; exit 1; }
labels="$(gh issue view "${ISSUE_NUMBER}" --json labels --jq '.labels[].name')"
labels="$(gh issue view "${ISSUE_NUMBER}" --repo "${GITHUB_REPOSITORY}" --json labels --jq '.labels[].name')"
grep -Fxq built <<<"${labels}" || { echo "accepted requires the built lifecycle state" >&2; exit 1; }
gh issue comment "${ISSUE_NUMBER}" --body "Accepted by @BrianInAz after private WSS, state-preserving install, restart, reconnect, and history-restoration evidence was recorded."
gh issue close "${ISSUE_NUMBER}"
gh issue comment "${ISSUE_NUMBER}" --repo "${GITHUB_REPOSITORY}" --body "Accepted by @BrianInAz after private WSS, state-preserving install, restart, reconnect, and history-restoration evidence was recorded."
gh issue close "${ISSUE_NUMBER}" --repo "${GITHUB_REPOSITORY}"

approval:
if: >-
Expand All @@ -158,7 +158,7 @@ jobs:
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
set -euo pipefail
body="$(gh issue view "${ISSUE_NUMBER}" --json body --jq .body)"
body="$(gh issue view "${ISSUE_NUMBER}" --repo "${GITHUB_REPOSITORY}" --json body --jq .body)"
marker="$(grep -E '^<!-- buzz-private-ca-release tag=(desktop-)?v[0-9]+\.[0-9]+\.[0-9]+ source_sha=[0-9a-f]{40} patch_sha=[0-9a-f]{40} patch_status=clean -->$' <<<"${body}")"
[[ -n "${marker}" ]] || { echo "not a clean monitor-created ticket" >&2; exit 1; }
tag="$(sed -E 's/.*tag=([^ ]+).*/\1/' <<<"${marker}")"
Expand Down Expand Up @@ -218,4 +218,4 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
gh issue comment "${{ needs.approval.outputs.issue_number }}" --body "Remote validation passed. Package on the approved local Mac with scripts/build-private-ca-macos.sh ${{ needs.approval.outputs.tag }} ${{ needs.approval.outputs.source_sha }}. GitHub-hosted macOS runners are intentionally not used."
gh issue comment "${{ needs.approval.outputs.issue_number }}" --repo "${GITHUB_REPOSITORY}" --body "Remote validation passed. Package on the approved local Mac with scripts/build-private-ca-macos.sh ${{ needs.approval.outputs.tag }} ${{ needs.approval.outputs.source_sha }}. GitHub-hosted macOS runners are intentionally not used."
3 changes: 3 additions & 0 deletions scripts/test-private-ca-release-contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ require "github.event.label.name == 'built'"
require "github.event.label.name == 'accepted'"
require 'accepted requires the built lifecycle state'
require 'not a clean monitor-created ticket'
require "gh issue view \"\${ISSUE_NUMBER}\" --repo \"\${GITHUB_REPOSITORY}\""
require "gh issue comment \"\${ISSUE_NUMBER}\" --repo \"\${GITHUB_REPOSITORY}\""
require "gh issue close \"\${ISSUE_NUMBER}\" --repo \"\${GITHUB_REPOSITORY}\""

forbid 'BUZZ_TEST_WSS_URL'
forbid 'buzz.bjzy.me'
Expand Down
Loading