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
45 changes: 43 additions & 2 deletions .github/workflows/release-digest-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,55 @@ on:
- rollback
permissions: {}
jobs:
prepare:
if: github.ref == 'refs/heads/main' && inputs.operation != 'rollback'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
actions: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Require successful validation of this main commit
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
result="$(gh run list --repo "$GITHUB_REPOSITORY" --commit "$GITHUB_SHA" \
--workflow validate.yml --event push --limit 1 --json status,conclusion \
--jq '.[0] | .status == "completed" and .conclusion == "success"')"
if [ "$result" != true ]; then
echo "This main commit must pass Validate before package publication." >&2
exit 1
fi
- name: Prepare the two reviewed digest scripts
run: |
set -euo pipefail
mkdir -p "$RUNNER_TEMP/digest-source/python/scripts"
cp python/scripts/account_daily_digest.py python/scripts/cloud_run_daily_digest.py \
"$RUNNER_TEMP/digest-source/python/scripts/"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: daily-digest-source
path: ${{ runner.temp }}/digest-source/
if-no-files-found: error
retention-days: 1
release:
if: github.ref == 'refs/heads/main'
needs: prepare
if: >-
always() && !cancelled() && github.ref == 'refs/heads/main' &&
(needs.prepare.result == 'success' ||
(inputs.operation == 'rollback' && needs.prepare.result == 'skipped'))
permissions:
id-token: write
uses: QuantStrategyLab/.github/.github/workflows/deploy-azure-blob.yml@5fe59a371186e25aa64b4a7a37582bf582996d92
actions: read
uses: QuantStrategyLab/.github/.github/workflows/deploy-azure-blob.yml@6b0581a02e419f4534886c27df5d99b951c23178
with:
environment: ${{ inputs.target }}
operation: ${{ inputs.operation }}
source-artifact: ${{ inputs.operation != 'rollback' && 'daily-digest-source' || '' }}
secrets:
DEPLOY_CLIENT_ID: ${{ secrets.DEPLOY_CLIENT_ID }}
DEPLOY_TENANT_ID: ${{ secrets.DEPLOY_TENANT_ID }}
Expand Down
10 changes: 7 additions & 3 deletions docs/unified-daily-notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,13 @@ runtime, broker, deployment or notification authority.
## Shared Azure package release

Run `Central digest package release` from the default branch. Select the
protected package environment and start with `verify`. For a release, stage
the reviewed ZIP by its SHA-256 in the private container, configure the two
digests, then select `deploy`. The shared workflow verifies the backup,
protected package environment and configure the fixed previous and candidate
digests. Start with `verify`. The caller requires successful validation of its
exact main commit and uploads the two reviewed digest scripts as a same-run
artifact. The shared workflow rebuilds the ZIP from the authenticated active
package, changing only those existing scripts. Verify checks the candidate
digest without writes. Select `deploy` to stage that exact ZIP in the private
container and release it. The shared workflow verifies the backup,
updates the live package conditionally, and reads it back. Use `rollback`
with the same digest pair when the candidate is still live. The Azure
send and check schedules keep their existing package path and runtime identity.
Expand Down
Loading