From 050a1a69d8d1c7254e27238f7f0fde322403aa57 Mon Sep 17 00:00:00 2001 From: Felix Simmendinger Date: Mon, 23 Nov 2026 16:05:34 +0100 Subject: [PATCH 1/6] add oci plugin publishing to release and republish workflow for existing releases Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/README.md | 33 ++++++++++- .github/workflows/release.yml | 25 ++++++++ .../workflows/republish-release-as-oci.yml | 59 +++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/republish-release-as-oci.yml diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 0f43325..67db41d 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -15,4 +15,35 @@ Releases When running the workflow manually on the `main` branch, a new release is created. The version is computed by removing the `-SNAPSHOT` suffix. The workflow creates a tag and attaches the release artifacts to it. -Afterwards the next snapshot-version is created and pushed. \ No newline at end of file +It also uses the pinned +[`release-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.1.0/actions/release-plugins) +to package the plugin ZIPs as OCI artifacts. Dry runs only build the OCI +artifacts; real releases push them and require the registry secrets described +below. +Afterwards the next snapshot-version is created and pushed. + +Republishing existing releases as OCI +------------------------------------- +Run **Republish Release as OCI** (`republish-release-as-oci.yml`) from the +Actions tab on the default branch. Enter an existing release version such as +`v3.0.0` or `3.0.0`, then select `public` (the default) or `ephemeral` for a +trial publication. Both options push artifacts; neither is a dry run. + +The workflow uses the pinned +[`republish-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.1.0/actions/republish-plugins). +It reads this repository's `v` release using the built-in GitHub +token with `contents: read`. The release must contain +`query-service-.json` with URL-based plugin entries and all ZIP +assets referenced by that descriptor. No source checkout, Maven build, new +Git tag, or GitHub release is created. + +Make the `PLUGINS_NEXUS_USER` and `PLUGINS_NEXUS_PASSWORD` repository or +organization secrets available to this repository, with write access to the +selected registry. Public artifacts are pushed through +`repository.coremedia.com/public-images` and pulled from +`container-registry.coremedia.com`; ephemeral artifacts use +`repository.coremedia.com/ephemeral-images` and +`ephemeral-container-registry.coremedia.com`, respectively. +The descriptor reference is +`/plugins/query-service:` (without the `v` prefix). +The action logs the resulting artifact references. \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f9efcb9..6a71fa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,17 @@ jobs: contents: write steps: + - name: Validate OCI registry credentials + if: ${{ !inputs.dry_run }} + env: + REGISTRY_USERNAME: ${{ secrets.PLUGINS_NEXUS_USER }} + REGISTRY_PASSWORD: ${{ secrets.PLUGINS_NEXUS_PASSWORD }} + run: | + if [[ -z "$REGISTRY_USERNAME" || -z "$REGISTRY_PASSWORD" ]]; then + echo "::error::PLUGINS_NEXUS_USER and PLUGINS_NEXUS_PASSWORD must be configured." + exit 1 + fi + - name: Checkout uses: actions/checkout@v4 with: @@ -120,6 +131,20 @@ jobs: done echo "${RESULT}" > "target/bundle/query-service-${VERSION}.json" + - name: Build and publish OCI plugin artifacts + uses: CoreMedia/oci-tooling/actions/release-plugins@b55a15495088c1e272f134f5e413d1ca9e0df5ca # v0.1.0 + with: + plugin-name: query-service + plugin-descriptor: query-service.json + version: ${{ steps.set-release-version.outputs.version }} + registry-username: ${{ secrets.PLUGINS_NEXUS_USER }} + registry-password: ${{ secrets.PLUGINS_NEXUS_PASSWORD }} + push: ${{ !inputs.dry_run }} + + - name: Remove OCI build files + # keep them out of the next snapshot version commit + run: rm -rf .oci-build build-plugin.sh + - name: Set Next Snapshot Version if: ${{ github.event.inputs.dry_run == 'false' }} id: set-snapshot-version diff --git a/.github/workflows/republish-release-as-oci.yml b/.github/workflows/republish-release-as-oci.yml new file mode 100644 index 0000000..babc3c2 --- /dev/null +++ b/.github/workflows/republish-release-as-oci.yml @@ -0,0 +1,59 @@ +name: Republish Release as OCI + +on: + workflow_dispatch: + inputs: + version: + description: 'Existing release version (e.g., v1.0.4 or 1.0.4)' + type: string + required: true + target-registry: + description: 'Target registry (ephemeral also publishes; it is not a dry run)' + type: choice + required: true + default: public + options: + - public + - ephemeral + +permissions: + contents: read + +jobs: + republish: + name: Republish existing release + runs-on: ubuntu-latest + + steps: + - name: Validate inputs and registry credentials + id: validate + env: + RELEASE_VERSION: ${{ inputs.version }} + TARGET_REGISTRY: ${{ inputs.target-registry }} + REGISTRY_USERNAME: ${{ secrets.PLUGINS_NEXUS_USER }} + REGISTRY_PASSWORD: ${{ secrets.PLUGINS_NEXUS_PASSWORD }} + run: | + VERSION="${RELEASE_VERSION#v}" + if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z]+([.-][0-9A-Za-z]+)*)?$ ]]; then + echo "::error::Version must be X.Y.Z with an optional v prefix and release suffix." + exit 1 + fi + if [[ "$TARGET_REGISTRY" != public && "$TARGET_REGISTRY" != ephemeral ]]; then + echo "::error::Target registry must be public or ephemeral." + exit 1 + fi + if [[ -z "$REGISTRY_USERNAME" || -z "$REGISTRY_PASSWORD" ]]; then + echo "::error::PLUGINS_NEXUS_USER and PLUGINS_NEXUS_PASSWORD must be configured." + exit 1 + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: Republish release assets as OCI artifacts + uses: CoreMedia/oci-tooling/actions/republish-plugins@b55a15495088c1e272f134f5e413d1ca9e0df5ca # v0.1.0 + with: + plugin-name: query-service + version: ${{ steps.validate.outputs.version }} + github-token: ${{ github.token }} + registry-username: ${{ secrets.PLUGINS_NEXUS_USER }} + registry-password: ${{ secrets.PLUGINS_NEXUS_PASSWORD }} + target-registry: ${{ inputs.target-registry }} From f53ac5a1adfe7a420e97a7992024c2bb992835f3 Mon Sep 17 00:00:00 2001 From: Felix Simmendinger Date: Mon, 23 Nov 2026 16:27:12 +0100 Subject: [PATCH 2/6] use separate nexus image secrets for public and ephemeral registries and publish oci artifacts on release builds only Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/README.md | 14 ++++++++------ .github/workflows/release.yml | 15 ++++++++------- .github/workflows/republish-release-as-oci.yml | 16 ++++++++++------ 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 67db41d..87c53cc 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -17,9 +17,8 @@ The version is computed by removing the `-SNAPSHOT` suffix. The workflow creates a tag and attaches the release artifacts to it. It also uses the pinned [`release-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.1.0/actions/release-plugins) -to package the plugin ZIPs as OCI artifacts. Dry runs only build the OCI -artifacts; real releases push them and require the registry secrets described -below. +to publish the plugin ZIPs as OCI artifacts to the public registry. Dry runs +skip this step; real releases require the registry secrets described below. Afterwards the next snapshot-version is created and pushed. Republishing existing releases as OCI @@ -37,9 +36,12 @@ token with `contents: read`. The release must contain assets referenced by that descriptor. No source checkout, Maven build, new Git tag, or GitHub release is created. -Make the `PLUGINS_NEXUS_USER` and `PLUGINS_NEXUS_PASSWORD` repository or -organization secrets available to this repository, with write access to the -selected registry. Public artifacts are pushed through +Two organization or repository secret pairs must be available to this +repository: `NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME` and +`NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD` for the public registry, and +`NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_USER` and +`NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_PASSWORD` for the ephemeral registry. +The workflows use the pair matching the target registry. Public artifacts are pushed through `repository.coremedia.com/public-images` and pulled from `container-registry.coremedia.com`; ephemeral artifacts use `repository.coremedia.com/ephemeral-images` and diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a71fa5..8af8aab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,11 +22,11 @@ jobs: - name: Validate OCI registry credentials if: ${{ !inputs.dry_run }} env: - REGISTRY_USERNAME: ${{ secrets.PLUGINS_NEXUS_USER }} - REGISTRY_PASSWORD: ${{ secrets.PLUGINS_NEXUS_PASSWORD }} + REGISTRY_USERNAME: ${{ secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD }} run: | if [[ -z "$REGISTRY_USERNAME" || -z "$REGISTRY_PASSWORD" ]]; then - echo "::error::PLUGINS_NEXUS_USER and PLUGINS_NEXUS_PASSWORD must be configured." + echo "::error::NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME and NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD must be configured." exit 1 fi @@ -131,18 +131,19 @@ jobs: done echo "${RESULT}" > "target/bundle/query-service-${VERSION}.json" - - name: Build and publish OCI plugin artifacts + - name: Publish OCI plugin artifacts + if: ${{ !inputs.dry_run }} uses: CoreMedia/oci-tooling/actions/release-plugins@b55a15495088c1e272f134f5e413d1ca9e0df5ca # v0.1.0 with: plugin-name: query-service plugin-descriptor: query-service.json version: ${{ steps.set-release-version.outputs.version }} - registry-username: ${{ secrets.PLUGINS_NEXUS_USER }} - registry-password: ${{ secrets.PLUGINS_NEXUS_PASSWORD }} - push: ${{ !inputs.dry_run }} + registry-username: ${{ secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME }} + registry-password: ${{ secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD }} - name: Remove OCI build files # keep them out of the next snapshot version commit + if: ${{ !inputs.dry_run }} run: rm -rf .oci-build build-plugin.sh - name: Set Next Snapshot Version diff --git a/.github/workflows/republish-release-as-oci.yml b/.github/workflows/republish-release-as-oci.yml index babc3c2..ed56d50 100644 --- a/.github/workflows/republish-release-as-oci.yml +++ b/.github/workflows/republish-release-as-oci.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: version: - description: 'Existing release version (e.g., v1.0.4 or 1.0.4)' + description: 'Existing release version (e.g., v3.0.0 or 3.0.0)' type: string required: true target-registry: @@ -30,8 +30,8 @@ jobs: env: RELEASE_VERSION: ${{ inputs.version }} TARGET_REGISTRY: ${{ inputs.target-registry }} - REGISTRY_USERNAME: ${{ secrets.PLUGINS_NEXUS_USER }} - REGISTRY_PASSWORD: ${{ secrets.PLUGINS_NEXUS_PASSWORD }} + REGISTRY_USERNAME: ${{ inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME || secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_USER }} + REGISTRY_PASSWORD: ${{ inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD || secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_PASSWORD }} run: | VERSION="${RELEASE_VERSION#v}" if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z]+([.-][0-9A-Za-z]+)*)?$ ]]; then @@ -43,7 +43,11 @@ jobs: exit 1 fi if [[ -z "$REGISTRY_USERNAME" || -z "$REGISTRY_PASSWORD" ]]; then - echo "::error::PLUGINS_NEXUS_USER and PLUGINS_NEXUS_PASSWORD must be configured." + if [[ "$TARGET_REGISTRY" == public ]]; then + echo "::error::NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME and NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD must be configured." + else + echo "::error::NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_USER and NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_PASSWORD must be configured." + fi exit 1 fi echo "version=$VERSION" >> "$GITHUB_OUTPUT" @@ -54,6 +58,6 @@ jobs: plugin-name: query-service version: ${{ steps.validate.outputs.version }} github-token: ${{ github.token }} - registry-username: ${{ secrets.PLUGINS_NEXUS_USER }} - registry-password: ${{ secrets.PLUGINS_NEXUS_PASSWORD }} + registry-username: ${{ inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME || secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_USER }} + registry-password: ${{ inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD || secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_PASSWORD }} target-registry: ${{ inputs.target-registry }} From 78459e513dffdab17c804931cd033e6b9c048b59 Mon Sep 17 00:00:00 2001 From: Felix Simmendinger Date: Mon, 23 Nov 2026 17:07:23 +0100 Subject: [PATCH 3/6] select registry secrets explicitly per target registry to avoid falling back to the other pair Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/republish-release-as-oci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/republish-release-as-oci.yml b/.github/workflows/republish-release-as-oci.yml index ed56d50..e007ea1 100644 --- a/.github/workflows/republish-release-as-oci.yml +++ b/.github/workflows/republish-release-as-oci.yml @@ -30,8 +30,8 @@ jobs: env: RELEASE_VERSION: ${{ inputs.version }} TARGET_REGISTRY: ${{ inputs.target-registry }} - REGISTRY_USERNAME: ${{ inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME || secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_USER }} - REGISTRY_PASSWORD: ${{ inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD || secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_PASSWORD }} + REGISTRY_USERNAME: ${{ (inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME) || (inputs.target-registry == 'ephemeral' && secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_USER) || '' }} + REGISTRY_PASSWORD: ${{ (inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD) || (inputs.target-registry == 'ephemeral' && secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_PASSWORD) || '' }} run: | VERSION="${RELEASE_VERSION#v}" if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z]+([.-][0-9A-Za-z]+)*)?$ ]]; then @@ -58,6 +58,6 @@ jobs: plugin-name: query-service version: ${{ steps.validate.outputs.version }} github-token: ${{ github.token }} - registry-username: ${{ inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME || secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_USER }} - registry-password: ${{ inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD || secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_PASSWORD }} + registry-username: ${{ (inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_USERNAME) || (inputs.target-registry == 'ephemeral' && secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_USER) || '' }} + registry-password: ${{ (inputs.target-registry == 'public' && secrets.NEXUS_GITHUB_ACTIONS_IMAGE_RELEASES_PASSWORD) || (inputs.target-registry == 'ephemeral' && secrets.NEXUS_GITHUB_ACTIONS_INTERNAL_IMAGES_PASSWORD) || '' }} target-registry: ${{ inputs.target-registry }} From a11fd644fa58c749216834131621ed25c307580f Mon Sep 17 00:00:00 2001 From: Felix Simmendinger Date: Tue, 24 Nov 2026 15:58:14 +0100 Subject: [PATCH 4/6] update oci-tooling actions to v0.2.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/README.md | 4 ++-- .github/workflows/release.yml | 2 +- .github/workflows/republish-release-as-oci.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 87c53cc..3f959cf 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -16,7 +16,7 @@ When running the workflow manually on the `main` branch, a new release is create The version is computed by removing the `-SNAPSHOT` suffix. The workflow creates a tag and attaches the release artifacts to it. It also uses the pinned -[`release-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.1.0/actions/release-plugins) +[`release-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.2.0/actions/release-plugins) to publish the plugin ZIPs as OCI artifacts to the public registry. Dry runs skip this step; real releases require the registry secrets described below. Afterwards the next snapshot-version is created and pushed. @@ -29,7 +29,7 @@ Actions tab on the default branch. Enter an existing release version such as trial publication. Both options push artifacts; neither is a dry run. The workflow uses the pinned -[`republish-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.1.0/actions/republish-plugins). +[`republish-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.2.0/actions/republish-plugins). It reads this repository's `v` release using the built-in GitHub token with `contents: read`. The release must contain `query-service-.json` with URL-based plugin entries and all ZIP diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8af8aab..0cb2491 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -133,7 +133,7 @@ jobs: - name: Publish OCI plugin artifacts if: ${{ !inputs.dry_run }} - uses: CoreMedia/oci-tooling/actions/release-plugins@b55a15495088c1e272f134f5e413d1ca9e0df5ca # v0.1.0 + uses: CoreMedia/oci-tooling/actions/release-plugins@2f8afe189b7dfe8822102e3cc22d003401064d3d # v0.2.0 with: plugin-name: query-service plugin-descriptor: query-service.json diff --git a/.github/workflows/republish-release-as-oci.yml b/.github/workflows/republish-release-as-oci.yml index e007ea1..03dafe9 100644 --- a/.github/workflows/republish-release-as-oci.yml +++ b/.github/workflows/republish-release-as-oci.yml @@ -53,7 +53,7 @@ jobs: echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Republish release assets as OCI artifacts - uses: CoreMedia/oci-tooling/actions/republish-plugins@b55a15495088c1e272f134f5e413d1ca9e0df5ca # v0.1.0 + uses: CoreMedia/oci-tooling/actions/republish-plugins@2f8afe189b7dfe8822102e3cc22d003401064d3d # v0.2.0 with: plugin-name: query-service version: ${{ steps.validate.outputs.version }} From 9b2c285b841f3ac7c9741dd46bbea8f5f12dd39d Mon Sep 17 00:00:00 2001 From: Felix Simmendinger Date: Tue, 24 Nov 2026 16:18:03 +0100 Subject: [PATCH 5/6] update oci-tooling actions to v0.2.1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/README.md | 4 ++-- .github/workflows/release.yml | 2 +- .github/workflows/republish-release-as-oci.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 3f959cf..fbea23f 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -16,7 +16,7 @@ When running the workflow manually on the `main` branch, a new release is create The version is computed by removing the `-SNAPSHOT` suffix. The workflow creates a tag and attaches the release artifacts to it. It also uses the pinned -[`release-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.2.0/actions/release-plugins) +[`release-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.2.1/actions/release-plugins) to publish the plugin ZIPs as OCI artifacts to the public registry. Dry runs skip this step; real releases require the registry secrets described below. Afterwards the next snapshot-version is created and pushed. @@ -29,7 +29,7 @@ Actions tab on the default branch. Enter an existing release version such as trial publication. Both options push artifacts; neither is a dry run. The workflow uses the pinned -[`republish-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.2.0/actions/republish-plugins). +[`republish-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.2.1/actions/republish-plugins). It reads this repository's `v` release using the built-in GitHub token with `contents: read`. The release must contain `query-service-.json` with URL-based plugin entries and all ZIP diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0cb2491..6b0d29f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -133,7 +133,7 @@ jobs: - name: Publish OCI plugin artifacts if: ${{ !inputs.dry_run }} - uses: CoreMedia/oci-tooling/actions/release-plugins@2f8afe189b7dfe8822102e3cc22d003401064d3d # v0.2.0 + uses: CoreMedia/oci-tooling/actions/release-plugins@c91dc8dd03c9b6d1b0f13ee5d2cb3da42d9dc83a # v0.2.1 with: plugin-name: query-service plugin-descriptor: query-service.json diff --git a/.github/workflows/republish-release-as-oci.yml b/.github/workflows/republish-release-as-oci.yml index 03dafe9..37a3f92 100644 --- a/.github/workflows/republish-release-as-oci.yml +++ b/.github/workflows/republish-release-as-oci.yml @@ -53,7 +53,7 @@ jobs: echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Republish release assets as OCI artifacts - uses: CoreMedia/oci-tooling/actions/republish-plugins@2f8afe189b7dfe8822102e3cc22d003401064d3d # v0.2.0 + uses: CoreMedia/oci-tooling/actions/republish-plugins@c91dc8dd03c9b6d1b0f13ee5d2cb3da42d9dc83a # v0.2.1 with: plugin-name: query-service version: ${{ steps.validate.outputs.version }} From 5aff4d9f28dead4b974e76b30af23b2d79707cd7 Mon Sep 17 00:00:00 2001 From: Felix Simmendinger Date: Tue, 24 Nov 2026 16:53:33 +0100 Subject: [PATCH 6/6] only run manual oci republishing from the default branch Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/README.md | 1 + .github/workflows/republish-release-as-oci.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index fbea23f..c802676 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -27,6 +27,7 @@ Run **Republish Release as OCI** (`republish-release-as-oci.yml`) from the Actions tab on the default branch. Enter an existing release version such as `v3.0.0` or `3.0.0`, then select `public` (the default) or `ephemeral` for a trial publication. Both options push artifacts; neither is a dry run. +Manual runs started from any other branch are skipped. The workflow uses the pinned [`republish-plugins` action](https://github.com/CoreMedia/oci-tooling/tree/v0.2.1/actions/republish-plugins). diff --git a/.github/workflows/republish-release-as-oci.yml b/.github/workflows/republish-release-as-oci.yml index 37a3f92..d16c95f 100644 --- a/.github/workflows/republish-release-as-oci.yml +++ b/.github/workflows/republish-release-as-oci.yml @@ -22,6 +22,9 @@ permissions: jobs: republish: name: Republish existing release + # guards against accidental runs from other branches; it does not protect + # the secrets (that requires an environment with a deployment branch rule) + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: