Skip to content

Commit e0a1de3

Browse files
bladata1990claude
andcommitted
Fix merge workflow for non-main branch pushes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: bladata1990 <balakrishnan.r@atlan.com>
1 parent 07f31c4 commit e0a1de3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/custom-package-container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
id: tags
5050
run: |
5151
if [ -n "${{ inputs.branch }}" ]; then
52-
# For manual runs with branch specified, use version and branch name (sanitized)
52+
# For non-main branches, use version and branch name (sanitized)
5353
BRANCH_NAME=$(echo "${{ inputs.branch }}" | sed 's/[^a-zA-Z0-9._-]/-/g')
5454
echo "tags=ghcr.io/atlanhq/csa-${{inputs.package_name}}:${{inputs.version}}-${BRANCH_NAME}" >> $GITHUB_OUTPUT
5555
echo "build_version=${{inputs.version}}-${BRANCH_NAME}" >> $GITHUB_OUTPUT

.github/workflows/merge.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ jobs:
234234
# For main branch pushes, use version and latest
235235
echo "tags=ghcr.io/atlanhq/atlan-java:${{ needs.merge-build.outputs.version }},ghcr.io/atlanhq/atlan-java:latest" >> $GITHUB_OUTPUT
236236
else
237-
# For non-main branch pushes, use version-SNAPSHOT-branch name
237+
# For non-main branch pushes, use version and branch name
238238
BRANCH_NAME=$(echo "${{ github.ref_name }}" | sed 's/[^a-zA-Z0-9._-]/-/g')
239-
echo "tags=ghcr.io/atlanhq/atlan-java:${{ needs.merge-build.outputs.version }}-SNAPSHOT-${BRANCH_NAME}" >> $GITHUB_OUTPUT
239+
echo "tags=ghcr.io/atlanhq/atlan-java:${{ needs.merge-build.outputs.version }}-${BRANCH_NAME}" >> $GITHUB_OUTPUT
240240
fi
241241
- name: Build and publish container image
242242
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
@@ -275,4 +275,4 @@ jobs:
275275
with:
276276
package_name: ${{ matrix.package_name }}
277277
version: ${{ needs.merge-build.outputs.version }}
278-
branch: ${{ github.event.inputs.branch || (github.ref != 'refs/heads/main' && format('SNAPSHOT-{0}', github.ref_name)) || '' }}
278+
branch: ${{ github.event.inputs.branch || (github.ref != 'refs/heads/main' && github.ref_name) || '' }}

0 commit comments

Comments
 (0)