diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 02314a2..03f65e4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,6 +24,7 @@ jobs: timeout-minutes: 60 outputs: sha: ${{ steps.resolve.outputs.sha }} + deployment-sha: ${{ steps.resolve.outputs.deployment-sha }} steps: - uses: codebeltnet/git-checkout@v1 with: @@ -32,7 +33,9 @@ jobs: env: GH_TOKEN: ${{ github.token }} RELEASE_TAG: ${{ github.event.release.tag_name || inputs.tag }} - run: python tools/release-images.py resolve + run: | + echo "deployment-sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" + python tools/release-images.py resolve - uses: actions/upload-artifact@v7 with: name: resolved-release @@ -55,7 +58,7 @@ jobs: steps: - uses: codebeltnet/git-checkout@v1 with: - ref: ${{ needs.resolve.outputs.sha }} + ref: ${{ needs.resolve.outputs.deployment-sha }} - uses: actions/download-artifact@v8 with: name: resolved-release @@ -78,7 +81,7 @@ jobs: steps: - uses: codebeltnet/git-checkout@v1 with: - ref: ${{ needs.resolve.outputs.sha }} + ref: ${{ needs.resolve.outputs.deployment-sha }} - uses: actions/download-artifact@v8 with: name: resolved-release diff --git a/README.md b/README.md index b09dd2e..578806c 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ Release delivery follows these stages: Configure the `Production` GitHub environment with required reviewers and restricted deployment refs **before enabling publication**. Store a Docker Hub account name in `DOCKERHUB_USERNAME` and a repository-scoped access token in `DOCKERHUB_TOKEN` as environment secrets. Only the publishing step receives these secrets; authentication uses stdin and a temporary auth file removed on exit. PRs, release preparation and artifact verification never receive Docker Hub credentials. Repository environment protection and branch required checks are administrator settings; adding workflow YAML does not configure them. -For recovery, dispatch `deploy.yml` from `main` with the already-published latest release tag. It reuses the original release assets and successful native results, revalidates checksums, and never replaces missing content with a rebuild. Partial tag uploads can be retried idempotently against the same bytes. A release that is no longer latest is refused. New SDK patch versions require a reviewed release preparation run and newly verified artifacts; existing release recovery cannot silently change SDK versions. +For recovery, dispatch `deploy.yml` from `main` with the already-published latest release tag. Deployment tools are resolved from `main` once and pinned to that exact commit for verification and promotion, so fixes to deployment tooling also apply when recovering an older release. The release source commit remains a separate identity checked against the saved artifacts; deployment never substitutes current source for released image content. It reuses the original release assets and successful native results, revalidates checksums, and never replaces missing content with a rebuild. Partial tag uploads can be retried idempotently against the same bytes. A release that is no longer latest is refused. New SDK patch versions require a reviewed release preparation run and newly verified artifacts; existing release recovery cannot silently change SDK versions. The DocFX-specific builder is unsuitable for csrun execution. The generic Codebelt verifier is reused after assembly. The generic publisher currently assumes one product SemVer tag, so the small `tools/oci.py` promotion path implements SDK aliases and post-push content verification. OCI verification, assembly and promotion are shared by CD and the independent manual module; release lifecycle orchestration belongs only to CI/CD. All action references use floating version tags. The Python OCI utilities use only the standard library.