From c3b21f95952932d398f1a1434f0e3098db91b8a7 Mon Sep 17 00:00:00 2001 From: OMPRAKASH MISHRA Date: Mon, 16 Jun 2025 19:33:48 -0700 Subject: [PATCH 1/3] fix: tag and version handle when it is a manual release in github --- .github/workflows/release.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5284a3c..02070f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,8 +22,8 @@ jobs: name: Vars runs-on: ubuntu-24.04 outputs: - tag: ${{ steps.changelog.outputs.tag || github.event.release.tag_name || '' }} - version: ${{ steps.changelog.outputs.version || github.event.release.tag_name || '' }} + tag: ${{ steps.changelog.outputs.tag || steps.release.outputs.tag || '' }} + version: ${{ steps.changelog.outputs.version || steps.release.outputs.version || '' }} clean_changelog: ${{ steps.changelog.outputs.clean_changelog || '' }} steps: - uses: actions/checkout@v4 @@ -39,6 +39,17 @@ jobs: skip-on-empty: "false" skip-commit: "true" git-push: "true" + - name: GitHub Release + id: release + if: (github.event_name == 'release') + shell: bash + run: | + echo "getting tag from release which was done manually in github" + # remove all spaces and new lines from the tag name and make it lowercase. + echo "tag=$(echo ${{ github.event.release.tag_name }} | tr -d '[:space:]' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT + # version is tag without v + echo "version=$(echo $tag | sed 's/^v//')" >> $GITHUB_OUTPUT + retag-images: name: Retag Images needs: [vars] From 795df5b4395587079d7c685cdbc6e828a64d9d93 Mon Sep 17 00:00:00 2001 From: Om Mishra <32200996+mishraomp@users.noreply.github.com> Date: Mon, 16 Jun 2025 19:35:18 -0700 Subject: [PATCH 2/3] copilot suggestion Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02070f0..5d71e87 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,9 +46,12 @@ jobs: run: | echo "getting tag from release which was done manually in github" # remove all spaces and new lines from the tag name and make it lowercase. - echo "tag=$(echo ${{ github.event.release.tag_name }} | tr -d '[:space:]' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT - # version is tag without v - echo "version=$(echo $tag | sed 's/^v//')" >> $GITHUB_OUTPUT + # Assign the computed tag value to a shell variable + tag=$(echo "${{ github.event.release.tag_name }}" | tr -d '[:space:]' | tr '[:upper:]' '[:lower:]') + echo "tag=$tag" >> $GITHUB_OUTPUT + # Compute version as tag without the leading 'v' + version=$(echo "$tag" | sed 's/^v//') + echo "version=$version" >> $GITHUB_OUTPUT retag-images: name: Retag Images From c1ae26c7fe93a91c9e8d457241eaa20558fac70f Mon Sep 17 00:00:00 2001 From: OMPRAKASH MISHRA Date: Mon, 16 Jun 2025 19:39:16 -0700 Subject: [PATCH 3/3] fix: build triggers --- .github/workflows/.builds.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/.builds.yml b/.github/workflows/.builds.yml index 6f5b4c6..dbdc06d 100644 --- a/.github/workflows/.builds.yml +++ b/.github/workflows/.builds.yml @@ -29,4 +29,5 @@ jobs: with: package: ${{ matrix.package }} tags: ${{ inputs.tags }} + triggers: ('${{ matrix.package }}/' '.github/workflows/.builds.yml') tag_fallback: test \ No newline at end of file