Skip to content

Commit

Permalink
fixup! fixup! address the missing upstream VERSION case
Browse files Browse the repository at this point in the history
  • Loading branch information
rexagod committed Nov 12, 2024
1 parent c71a859 commit d381887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/merge-acm-flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,11 @@ jobs:
run: git merge --continue
- name: Add VERSION file if not present
run: |
is_version_file_present_upstream=$(git ls-tree ${{ steps.upstream.outputs.release }} | grep VERSION || true)
# All tags use the vX.Y.Z format currently.
version_from_tag=$(echo ${{ steps.upstream.outputs.release }} | sed -e "s/^v//")
if [ -f VERSION ]; then
# Perform check only if both remotes have the VERSION file.
if [ -n "$is_version_file_present_upstream" ] && [ -f VERSION ]; then
version_from_file=$(cat VERSION)
if [ "$version_from_tag" != "$version_from_file" ];then
echo "::error:: tag version ${version_from_tag} doesn't correspond to version ${version_from_file} from VERSION file"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/merge-flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ jobs:
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config --global core.editor "/bin/true"
git remote add upstream https://github.com/${{ inputs.upstream }}
git fetch upstream --tags
git fetch https://github.com/${{ inputs.upstream }} --tags
- name: Merge with upstream ${{ steps.upstream.outputs.release }} tag
id: merge
run: |
Expand Down

0 comments on commit d381887

Please sign in to comment.