mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-20 15:47:40 -05:00
ci(server): take the publication policy from master, not the tag
The publish job checks out the tag and ran that tree's release helper for preflight and readback, so an older tag (v0.7.0 requires a private package) could never publish under the current public policy. Copy master's helper before checking out the tag and run preflight/readback from it; the tag's tree is still what gets built, tested and smoked. The helper is stdlib-only and its local identity stamp is unchanged since v0.7.0, so the two copies agree on it.
This commit is contained in:
1 parent
480efb2893
commit
244f946912
3 files changed
+26
-5
No files matched your search
@@ -141,8 +141,8 @@ jobs:
|
||||
steps:
|
||||
- name: Isolate logs, safe metadata and ephemeral auth
|
||||
run: |
|
||||
printf 'METADATA_DIR=%s/server-image-metadata\nRESULTS=%s/server-image-results\nDOCKER_CONFIG=%s/server-image-auth\n' \
|
||||
"$RUNNER_TEMP" "$RUNNER_TEMP" "$RUNNER_TEMP" >> "$GITHUB_ENV"
|
||||
printf 'METADATA_DIR=%s/server-image-metadata\nRESULTS=%s/server-image-results\nDOCKER_CONFIG=%s/server-image-auth\nRELEASE_POLICY=%s/release-policy/server_image_release.py\n' \
|
||||
"$RUNNER_TEMP" "$RUNNER_TEMP" "$RUNNER_TEMP" "$RUNNER_TEMP" >> "$GITHUB_ENV"
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
with:
|
||||
ref: master
|
||||
@@ -153,6 +153,10 @@ jobs:
|
||||
env:
|
||||
TAG: ${{ github.event.release.tag_name || inputs.tag }}
|
||||
run: python3 scripts/server_image_release.py source
|
||||
- name: Keep master's publication policy (an older tag's helper must not decide visibility)
|
||||
run: |
|
||||
mkdir -p "$(dirname "$RELEASE_POLICY")"
|
||||
cp scripts/server_image_release.py "$RELEASE_POLICY"
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
with:
|
||||
ref: ${{ steps.source.outputs.source_sha }}
|
||||
@@ -203,7 +207,7 @@ jobs:
|
||||
- name: Refuse unknown visibility, wrong association, and both existing tags
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: python3 scripts/server_image_release.py preflight
|
||||
run: python3 "$RELEASE_POLICY" preflight
|
||||
- name: Login and publish only the two immutable tags (no rebuild)
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -219,7 +223,7 @@ jobs:
|
||||
id: readback
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: python3 scripts/server_image_release.py readback
|
||||
run: python3 "$RELEASE_POLICY" readback
|
||||
- name: Remove ephemeral Docker credentials
|
||||
if: always()
|
||||
run: rm -rf -- "$DOCKER_CONFIG"
|
||||
|
||||
Reference in new issue
Block a user