-
Notifications
You must be signed in to change notification settings - Fork 50
Add two-phase release workflow #666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: Install yq | ||
| description: Install mikefarah/yq at a pinned version | ||
|
|
||
| inputs: | ||
| version: | ||
| description: "yq version to install" | ||
| required: false | ||
| default: "4.53.3" | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Install yq v${{ inputs.version }} | ||
| shell: bash | ||
| run: | | ||
| sudo wget -qO /usr/local/bin/yq \ | ||
| "https://github.com/mikefarah/yq/releases/download/v${{ inputs.version }}/yq_linux_amd64" | ||
| sudo chmod +x /usr/local/bin/yq | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| RELEASE_YAML="${1:-release.yaml}" | ||
|
|
||
| if [[ ! -f "$RELEASE_YAML" ]]; then | ||
| echo "::error::File not found: $RELEASE_YAML" | ||
| exit 1 | ||
| fi | ||
|
|
||
| VERSION=$(yq '.authorino.version' "$RELEASE_YAML") | ||
| if [[ -z "$VERSION" || "$VERSION" == "null" ]]; then | ||
| echo "::error::No version found in $RELEASE_YAML under authorino.version" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$ ]]; then | ||
| echo "::error::Invalid semver: $VERSION" | ||
| exit 1 | ||
| fi | ||
|
Comment on lines
+17
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift Use one SemVer-compliant validator across both release paths. The duplicated regex accepts invalid versions such as
📍 Affects 2 files
🤖 Prompt for AI Agents |
||
|
|
||
| MAJOR=$(echo "$VERSION" | cut -d. -f1) | ||
| MINOR=$(echo "$VERSION" | cut -d. -f2) | ||
| PATCH=$(echo "$VERSION" | cut -d. -f3 | cut -d- -f1) | ||
| RELEASE_BRANCH="release-${MAJOR}.${MINOR}" | ||
|
|
||
| echo "version=$VERSION" >> "${GITHUB_OUTPUT:-/dev/stdout}" | ||
| echo "major=$MAJOR" >> "${GITHUB_OUTPUT:-/dev/stdout}" | ||
| echo "minor=$MINOR" >> "${GITHUB_OUTPUT:-/dev/stdout}" | ||
| echo "patch=$PATCH" >> "${GITHUB_OUTPUT:-/dev/stdout}" | ||
| echo "release-branch=$RELEASE_BRANCH" >> "${GITHUB_OUTPUT:-/dev/stdout}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| BRANCH="${1:?Branch name required}" | ||
| ORG="${2:-Kuadrant}" | ||
| RELEASE_YAML="${3:-release.yaml}" | ||
|
|
||
| if [[ ! -f "$RELEASE_YAML" ]]; then | ||
| echo "::error::File not found: $RELEASE_YAML" | ||
| exit 1 | ||
| fi | ||
|
|
||
| VERSION=$(yq '.authorino.version' "$RELEASE_YAML") | ||
|
|
||
| if [[ "$BRANCH" != "main" && "$VERSION" == "0.0.0" ]]; then | ||
| echo "::error::release.yaml version is 0.0.0 on branch '$BRANCH' -- must specify a release version on non-main branches" | ||
| exit 1 | ||
| fi | ||
|
Comment on lines
+13
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Validate the version format, not only the
🤖 Prompt for AI Agents |
||
|
|
||
| ERRORS=0 | ||
| ENTRIES=$(yq -o=json '.dependencies // {} | to_entries[]' "$RELEASE_YAML" 2>/dev/null || true) | ||
| if [[ -n "$ENTRIES" ]]; then | ||
|
Comment on lines
+21
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
yq --version
tmp_file="$(mktemp)"
trap 'rm -f "$tmp_file"' EXIT
cat >"$tmp_file" <<'YAML'
authorino:
version: "1.2.3"
dependencies: invalid
YAML
if yq -e '(.dependencies == null) or (.dependencies | type == "!!map")' "$tmp_file" >/dev/null; then
echo "Expected a scalar dependencies value to fail validation" >&2
exit 1
fiRepository: Kuadrant/authorino Length of output: 196 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf 'Repository files matching validate-release-yaml.sh:\n'
fd -a 'validate-release-yaml\.sh$' . || true
printf '\nFile context:\n'
if [ -f .github/scripts/validate-release-yaml.sh ]; then
cat -n .github/scripts/validate-release-yaml.sh
fi
printf '\nSearch for validate-release-yaml usage:\n'
rg -n "validate-release-yaml|RELEASE_YAML|dependencies" .github test . 2>/dev/null | head -200Repository: Kuadrant/authorino Length of output: 3776 🌐 Web query:
💡 Result: In mikefarah/yq, the Citations:
Reject invalid If 🤖 Prompt for AI Agents |
||
| while IFS= read -r entry; do | ||
| dep=$(echo "$entry" | jq -r '.key') | ||
| dep_version=$(echo "$entry" | jq -r '.value') | ||
| if [[ "$dep_version" != "0.0.0" && "$dep_version" != "null" && -n "$dep_version" ]]; then | ||
| draft_status=$(gh release view "v${dep_version}" --repo "${ORG}/${dep}" --json isDraft -q '.isDraft' 2>/dev/null) || { | ||
| echo "::error::Dependency '${dep}' targets version '${dep_version}', but release v${dep_version} does not exist in ${ORG}/${dep}" | ||
| ERRORS=$((ERRORS + 1)) | ||
| continue | ||
| } | ||
| if [[ "$draft_status" == "true" ]]; then | ||
| echo "::error::Dependency '${dep}' targets version '${dep_version}', but release v${dep_version} in ${ORG}/${dep} is a draft" | ||
| ERRORS=$((ERRORS + 1)) | ||
| fi | ||
| fi | ||
| done < <(echo "$ENTRIES" | jq -c '.') | ||
| fi | ||
|
|
||
| if [[ "$ERRORS" -gt 0 ]]; then | ||
| echo "::error::release.yaml validation failed with ${ERRORS} dependency error(s)" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "release.yaml validation passed" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,16 @@ on: | |
| - 'main' | ||
| - 'master' | ||
| workflow_dispatch: {} | ||
| workflow_call: | ||
| inputs: | ||
| version: | ||
| description: "Release version (e.g. 0.26.0)" | ||
| type: string | ||
| required: true | ||
| ref: | ||
| description: "Git ref to build from (e.g. v0.26.0)" | ||
| type: string | ||
| required: true | ||
|
|
||
| env: | ||
| IMG_TAGS: ${{ github.sha }} | ||
|
|
@@ -29,7 +39,10 @@ jobs: | |
| - name: Set Authorino build info | ||
| id: build-info | ||
| run: | | ||
| if [[ ${GITHUB_REF_NAME/\//-} =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]]; then | ||
| if [[ -n "${{ inputs.version }}" ]]; then | ||
| echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT | ||
| echo "version_tag=v${{ inputs.version }}" >> $GITHUB_OUTPUT | ||
| elif [[ ${GITHUB_REF_NAME/\//-} =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]]; then | ||
|
Comment on lines
+42
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== workflow target =="
sed -n '1,120p' .github/workflows/build-images.yaml 2>/dev/null || true
echo
echo "== all inputs.version occurrences in workflows =="
rg -n "inputs\.version|GITHUB_OUTPUT|GITHUB_REF_NAME" .github/workflows -S
echo
echo "== GitHub Actions syntax/security scan references (zizmor, semgrep, actionlint) =="
sed -n '1,80p' README.md 2>/dev/null || true
rg -n "zizmor|actionlint|semgrep|github-actions|workflow\\/" .github README.md 2>/dev/null || true
echo
echo "== shell injection probe for direct string interpolation in quoted expansion =="
python3 - <<'PY'
import subprocess, tempfile, os
evil = 'README.md;false "x=1"'
script = f'''set -e
if [[ -n "READER_VERSION" ]]; then
echo "readme=$READER_VERSION" >> "$GITHUB_OUTPUT"
elif [[ ${"{GITHUB_REF_NAME\"}"}.x =~ ^v[0-9]+ ]]; then
echo "ok=malicious" >> "$GITHUB_OUTPUT"
fi
'''
env = dict(os.environ, GITHUB_OUTPUT='tmp', GITHUB_REF_NAME='v1.2.3')
result = subprocess.run(['bash','/bin/echo','README.md;false "x=1"'], text=True, capture_output=True)
# direct example:
src = f'''if [[ -n "{[evil[0]]*3}" ]]; then echo "ok"; fi'''
PYRepository: Kuadrant/authorino Length of output: 15101 🌐 Web query:
💡 Result: zizmor is a security-focused static analysis tool designed specifically for auditing GitHub Actions workflows and configurations [1][2]. It helps identify common security vulnerabilities, including template injection and unsafe handling of workflow context variables [2]. Regarding the specific security concerns you mentioned: Template Injection and Shell Injection zizmor detects dangerous usage of templated expressions ( Citations:
🌐 Web query:
💡 Result: The zizmor tool is a static analysis security scanner for GitHub Actions workflows that helps identify vulnerabilities, including template injection risks [1][2]. While there is no specific rule named "context-in-expression" in the public documentation, zizmor utilizes an internal expression analysis engine to trace how data flows from workflow contexts (like job outputs or step inputs) into potentially executable areas [3][4][5]. The core security concern zizmor addresses in this area is template injection, where untrusted or attacker-controlled data from contexts is used in a way that allows arbitrary code execution [5][2]. Zizmor's analysis engine tracks "contexts" (e.g., github.actor, inputs.foo, or outputs from steps) as they flow through expressions [3][4]. Regarding GITHUB_OUTPUT and quoting, GitHub Actions workflows often use GITHUB_OUTPUT to set environment variables for subsequent steps [6][7]. A common security best practice—and a pattern that static analysis tools like zizmor encourage—is to treat output data as untrusted input. When such data is later used in an expression, failing to properly quote or sanitize the expression can create injection vectors if the output contains characters that alter the structure of the YAML or the expression itself [5]. Zizmor evaluates whether an expression is "safe" by determining if it is composed entirely of static, non-attacker-controlled elements (like string literals defined in the workflow) or if it incorporates variable context data that could be maliciously influenced [5]. If your workflow uses expressions involving GITHUB_OUTPUT or similar context-derived values, zizmor may flag these if it determines that the data flows directly into an execution context without sufficient insulation or structural safety [3][5]. To remediate such findings, ensure that any dynamic output being referenced is handled securely, such as by using JSON functions to safely pass complex data or by ensuring that string concatenation does not lead to unintended code evaluation [8][5]. Citations:
Avoid interpolating GitHub Actions substitutes 🧰 Tools🪛 zizmor (1.28.0)[error] 42-42: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) [error] 43-43: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) [error] 44-44: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| tag=${GITHUB_REF_NAME/\//-} | ||
| echo "version=${tag#v}" >> $GITHUB_OUTPUT | ||
| echo "version_tag=${tag}" >> $GITHUB_OUTPUT | ||
|
|
@@ -62,6 +75,8 @@ jobs: | |
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # ratchet:actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.ref || '' }} | ||
|
Comment on lines
+78
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== workflow files =="
git ls-files .github/workflows
echo "== target file outline =="
wc -l .github/workflows/build-images.yaml
sed -n '1,220p' .github/workflows/build-images.yaml
echo "== repo workflows mentioning image provenance/github-sha/git_sha =="
rg -n "github\.sha|git_sha|git rev-parse|inputs\.ref|workflow_dispatch|on:\s*$|uses: .*build-images" .github/workflows -SRepository: Kuadrant/authorino Length of output: 9773 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== release workflow around reusable call =="
sed -n '70,110p' .github/workflows/release.yaml
echo "== release triggers and version/tag paths =="
sed -n '1,90p' .github/workflows/release.yaml
echo "== context from workflow_call docs via public source if available; search local docs =="
rg -n "workflow_call|caller workflow|github\.sha|GITHUB_SHA|inputs\.ref" .github README.md 2>/dev/null || trueRepository: Kuadrant/authorino Length of output: 4855 🌐 Web query:
💡 Result: In GitHub Actions, the github context variables—including github.sha—are always associated with the caller workflow, not the reusable workflow [1][2]. Consequently, github.sha inside a reusable workflow refers to the commit SHA of the caller's repository, not the repository that contains the reusable workflow [3][2]. If you need to identify the specific repository or commit SHA of the reusable workflow itself, you should use the job context [4]. The following properties are available: - job.workflow_repository: The owner/repo of the repository containing the workflow file that defines the current job [4]. - job.workflow_sha: The commit SHA of the workflow file that defines the current job [4]. For example, if you are using actions/checkout within a reusable workflow and want to ensure you check out the code from the reusable workflow's own repository and commit, you can use these properties: - uses: actions/checkout@v4 with: repository: ${{ job.workflow_repository }} ref: ${{ job.workflow_sha }} This approach resolves issues where reusable workflows might otherwise default to the caller's context or the default branch of the reusable repository [4]. If you need to pass specific version information as an input to a reusable workflow, it is common practice to define an explicit input (e.g., gh-workflows-ref) in your workflow_call configuration, which the caller must manually populate [3]. Citations:
🌐 Web query:
💡 Result: In GitHub Actions, the github context within a reusable workflow is always associated with the caller workflow, not the reusable workflow itself [1][2][3]. Consequently, github.sha will return the commit SHA of the caller repository's event that triggered the workflow run, not the SHA of the reusable workflow [4][5]. To access information about the reusable workflow's own repository and commit SHA, you should use the job context properties [5]. These properties were specifically introduced to provide details about the workflow file that defines the current job [5]: - job.workflow_sha: The commit SHA of the workflow file that defines the current job [5]. - job.workflow_repository: The owner/repo of the repository containing the workflow file that defines the current job [5]. - job.workflow_ref: The full ref of the workflow file that defines the current job [5]. - job.workflow_file_path: The file path of the workflow file that defines the current job, relative to the repository root [5]. These properties are particularly useful when a reusable workflow needs to check out its own source code (e.g., to access co-located scripts or configuration files) [6][5]. You can use them with the actions/checkout action as follows [6]: - uses: actions/checkout@v4 with: repository: ${{ job.workflow_repository }} ref: ${{ job.workflow_sha }} For additional context, while github.sha refers to the trigger event of the caller workflow, github.workflow_sha refers to the SHA of the workflow file of the top-most (caller) workflow, which is distinct from the job.workflow_sha of a reusable workflow [5][7]. Citations:
Derive image provenance from the checked-out ref.
🧰 Tools🪛 zizmor (1.28.0)[warning] 76-79: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI Agents |
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # ratchet:docker/setup-buildx-action@v3 | ||
| - name: Login to registry | ||
|
|
@@ -119,9 +134,9 @@ jobs: | |
| with: | ||
| images: ${{ env.IMG_REGISTRY_HOST }}/${{ env.IMG_REGISTRY_ORG }}/authorino | ||
| tags: | | ||
| type=raw,value=${{ github.ref_name }},enable={{is_not_default_branch}} | ||
| type=raw,value=${{ github.sha }},enable={{is_default_branch}} | ||
| type=raw,value=latest,enable={{is_default_branch}} | ||
| type=raw,value=${{ needs.prepare.outputs.version_tag }} | ||
| type=raw,value=${{ github.sha }},enable=${{ needs.prepare.outputs.version_tag == 'latest' }} | ||
| type=raw,value=latest,enable=${{ needs.prepare.outputs.version_tag == 'latest' }} | ||
| - name: Login to registry | ||
| if: ${{ !env.ACT }} | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # ratchet:docker/login-action@v3 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| name: Pre-release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Release version (semver, e.g. 1.5.0)" | ||
| required: true | ||
| type: string | ||
| source-branch: | ||
| description: "Branch to base the pre-release changes on (default: main)" | ||
| required: false | ||
| type: string | ||
| default: "main" | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| setup: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| version: ${{ steps.validate.outputs.version }} | ||
| release-branch: ${{ steps.validate.outputs.release-branch }} | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # ratchet:actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.source-branch }} | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Validate version format | ||
| id: validate | ||
| run: | | ||
| VERSION="${{ inputs.version }}" | ||
| if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$ ]]; then | ||
| echo "::error::Invalid semver version: $VERSION" | ||
| exit 1 | ||
| fi | ||
| MAJOR=$(echo "$VERSION" | cut -d. -f1) | ||
| MINOR=$(echo "$VERSION" | cut -d. -f2) | ||
| RELEASE_BRANCH="release-${MAJOR}.${MINOR}" | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
| echo "release-branch=$RELEASE_BRANCH" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Create or verify release branch | ||
| run: | | ||
| RELEASE_BRANCH="${{ steps.validate.outputs.release-branch }}" | ||
| if git ls-remote --exit-code origin "refs/heads/${RELEASE_BRANCH}" >/dev/null 2>&1; then | ||
| echo "Release branch '${RELEASE_BRANCH}' already exists" | ||
| else | ||
| echo "Creating release branch '${RELEASE_BRANCH}' from '${{ inputs.source-branch }}'" | ||
| git checkout -b "${RELEASE_BRANCH}" | ||
| git push origin "${RELEASE_BRANCH}" | ||
| fi | ||
|
|
||
| prepare-release: | ||
| needs: setup | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # ratchet:actions/checkout@v4 | ||
| with: | ||
| ref: ${{ needs.setup.outputs.release-branch }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Create pre-release branch | ||
| run: | | ||
| PRE_RELEASE_BRANCH="pre-release-v${{ needs.setup.outputs.version }}" | ||
| if git ls-remote --exit-code origin "refs/heads/${PRE_RELEASE_BRANCH}" >/dev/null 2>&1; then | ||
| echo "::error::Pre-release branch '${PRE_RELEASE_BRANCH}' already exists. Delete it first or use a different version." | ||
| exit 1 | ||
| fi | ||
| git checkout -b "${PRE_RELEASE_BRANCH}" | ||
|
|
||
| - uses: ./.github/actions/install-yq | ||
|
|
||
| - name: Update release.yaml | ||
| run: | | ||
| VERSION="${{ needs.setup.outputs.version }}" | ||
| yq -i ".authorino.version = \"${VERSION}\"" release.yaml | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # ratchet:actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Run code generation | ||
| run: | | ||
| make generate | ||
| make manifests | ||
|
|
||
| - name: Commit and push changes | ||
| run: | | ||
| VERSION="${{ needs.setup.outputs.version }}" | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add -A | ||
| if git diff --cached --quiet; then | ||
| echo "No changes to commit" | ||
| else | ||
| git commit -m "chore: prepare release v${VERSION}" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing the sign-off. Won't this fail the DCO check?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could find documentation around this, but with the help of cluade found it the actions source. The check is skipped of merge commits, and for accounts that are marked as bots. Could there be a question over should that be case, possible, but that is why it wont fail the check. |
||
| fi | ||
| git push origin "pre-release-v${VERSION}" | ||
|
|
||
| open-pr: | ||
| needs: [setup, prepare-release] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # ratchet:actions/checkout@v4 | ||
|
|
||
| - name: Open pull request | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| VERSION="${{ needs.setup.outputs.version }}" | ||
| RELEASE_BRANCH="${{ needs.setup.outputs.release-branch }}" | ||
|
|
||
| gh pr create \ | ||
| --base "${RELEASE_BRANCH}" \ | ||
| --head "pre-release-v${VERSION}" \ | ||
| --title "Release v${VERSION}" \ | ||
| --body "$(cat <<EOF | ||
| ## Release v${VERSION} | ||
|
|
||
| This PR prepares the release of v${VERSION}. | ||
|
|
||
| ### Pre-release changes | ||
| - Updated \`release.yaml\` version to \`${VERSION}\` | ||
| - Ran \`make generate\` and \`make manifests\` | ||
|
|
||
| ### Checklist | ||
| - [ ] Version numbers are correct | ||
| - [ ] All pre-release modifications look correct | ||
| - [ ] CI checks pass | ||
| - [ ] Version gate check passes | ||
|
|
||
| ### Next steps | ||
| After merging this PR, run the **Release** workflow with branch \`${RELEASE_BRANCH}\`. | ||
| EOF | ||
| )" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Kuadrant/authorino
Length of output: 1799
Verify the yq binary before installing it with sudo.
The action downloads an executable directly into
/usr/local/binwithout integrity validation, and it is used by release/version-gate workflows. Add the upstream SHA-256 for the pinned release asset and check it beforechmod.🤖 Prompt for AI Agents