From 75f30511833eb72dfe24fb4e2946aab65571173c Mon Sep 17 00:00:00 2001 From: tranch Date: Thu, 9 Jul 2026 18:21:37 +0800 Subject: Promote ACR images manually Remove push-triggered builds and split ACR publishing out of the build workflow. Add a manual promote-acr workflow that copies an existing GHCR tag to ACR, supports explicit target tags, validates the required ACR configuration, and signs the promoted ACR digest. Verification: parsed both workflow YAML files and checked embedded run blocks with bash -n. --- .github/workflows/build.yml | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to '.github/workflows/build.yml') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b822ac6..56f8da9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,11 +6,6 @@ on: - main schedule: - cron: '05 10 * * *' # 10:05am UTC everyday - push: - branches: - - main - paths-ignore: - - '**/README.md' workflow_dispatch: env: @@ -163,23 +158,3 @@ jobs: DIGEST: ${{ steps.push-image.outputs.digest }} run: | cosign sign -y --key env://COSIGN_PRIVATE_KEY ${IMAGE_REGISTRY}/${IMAGE_NAME}@${DIGEST} - - - name: Push To ACR - if: | - github.event_name != 'pull_request' && - github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && - vars.ACR_REGISTRY != '' && - vars.ACR_NAMESPACE != '' - env: - ACR_REGISTRY: ${{ vars.ACR_REGISTRY }} - ACR_NAMESPACE: ${{ vars.ACR_NAMESPACE }} - ACR_USERNAME: ${{ secrets.ACR_USERNAME }} - ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }} - ALIAS_TAGS: ${{ steps.gen-build-tags.outputs.alias_tags }} - run: | - set -euo pipefail - echo "$ACR_PASSWORD" | sudo -E podman login "$ACR_REGISTRY" -u "$ACR_USERNAME" --password-stdin - - for tag in ${ALIAS_TAGS}; do - sudo -E podman push "${IMAGE_NAME}:${tag}" "${ACR_REGISTRY}/${ACR_NAMESPACE}/${IMAGE_NAME}:${tag}" - done -- cgit v1.2.3