Skip to content

feat: add check_previous_channel_release composite action#73

Merged
duckhawk merged 1 commit into
v14from
feat/check-previous-channel-release-v14
May 13, 2026
Merged

feat: add check_previous_channel_release composite action#73
duckhawk merged 1 commit into
v14from
feat/check-previous-channel-release-v14

Conversation

@duckhawk
Copy link
Copy Markdown
Member

Summary

  • Adds a new composite action check_previous_channel_release that verifies the previous release channel exposes the same module tag before promoting to the next channel.
  • Action lifts the logic previously duplicated as .github/check_previous_channel_release.sh in module repositories (e.g. csi-ceph).
  • Improves the version.json parser so it handles both single-line ({"version":"v0.1.14"}) and pretty-printed multi-line output from yq -o=json (newlines and indentation around the keys), via a multiline-aware PCRE grep (grep -aoPz).
  • Updates README.md to list the new action.

Usage example

- uses: deckhouse/modules-actions/setup@v14
  with:
    registry: ${{ vars.PROD_REGISTRY }}
    registry_login: ${{ vars.PROD_MODULES_REGISTRY_LOGIN }}
    registry_password: ${{ secrets.PROD_MODULES_REGISTRY_PASSWORD }}

- uses: deckhouse/modules-actions/check_previous_channel_release@v14
  with:
    module_source: "${{ vars.PROD_REGISTRY }}/${{ vars.PROD_MODULE_SOURCE_NAME }}/ce/modules"
    module_name: ${{ vars.MODULE_NAME }}
    module_tag: ${{ github.event.inputs.tag }}
    release_channel: ${{ github.event.inputs.channel }}
    registry: ${{ vars.PROD_REGISTRY }}
    registry_login: license-token
    registry_password: ${{ secrets.PROD_MODULES_READ_REGISTRY_PASSWORD }}

Test plan

  • Locally verified the new grep -aoPz '\{\s*"version"\s*:\s*"[^"]+"\s*\}' | head -z -n 1 | tr -d '\0' | jq -r .version pipeline against:
    • {"version":"v0.1.14"}
    • pretty-printed {\n "version": "v0.1.0"\n}
    • the same JSON embedded in a binary stream with NUL/non-UTF-8 bytes around it
  • Smoke-test by wiring a module repo (e.g. csi-ceph deploy_prod.yml) to check_previous_channel_release@v14 and triggering a non-alpha channel deploy.

Promotes the per-repository check_previous_channel_release.sh script
into a reusable composite action so module repositories don't have to
ship and maintain their own copy.

The version parser now handles both single-line (`{"version":"v0.1.14"}`)
and pretty-printed multi-line `version.json` produced by yq (newlines
and indentation around the keys), using a multiline-aware PCRE grep.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant