Skip to content
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

address the missing upstream VERSION case #101

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/merge-flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
echo "release=${UPSTREAM_VERSION}" >> "$GITHUB_OUTPUT"
- name: Find github org name from repo name
id: org
run: |

Check failure on line 84 in .github/workflows/merge-flow.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2129:style:1:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck] Raw Output: .github/workflows/merge-flow.yaml:84:9: shellcheck reported issue in this script: SC2129:style:1:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]

Check failure on line 84 in .github/workflows/merge-flow.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:54: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/merge-flow.yaml:84:9: shellcheck reported issue in this script: SC2086:info:1:54: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 84 in .github/workflows/merge-flow.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:2:58: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/merge-flow.yaml:84:9: shellcheck reported issue in this script: SC2086:info:2:58: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 84 in .github/workflows/merge-flow.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:3:52: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/merge-flow.yaml:84:9: shellcheck reported issue in this script: SC2086:info:3:52: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 84 in .github/workflows/merge-flow.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:20:52: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/merge-flow.yaml:84:9: shellcheck reported issue in this script: SC2086:info:20:52: Double quote to prevent globbing and word splitting [shellcheck]
echo "upstream=$(dirname ${{ inputs.upstream }})" >> $GITHUB_OUTPUT
echo "downstream=$(dirname ${{ inputs.downstream }})" >> $GITHUB_OUTPUT
echo "sandbox=$(dirname ${{ inputs.sandbox }})" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -110,7 +110,7 @@
lenient: false # fail if either of the versions cannot be parsed
- name: Check openshift fork status
id: fork-sync
run: |

Check failure on line 113 in .github/workflows/merge-flow.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:4:29: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/merge-flow.yaml:113:9: shellcheck reported issue in this script: SC2086:info:4:29: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 113 in .github/workflows/merge-flow.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:7:29: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/merge-flow.yaml:113:9: shellcheck reported issue in this script: SC2086:info:7:29: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 113 in .github/workflows/merge-flow.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:11:26: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/merge-flow.yaml:113:9: shellcheck reported issue in this script: SC2086:info:11:26: Double quote to prevent globbing and word splitting [shellcheck]
SEMVER_RESULT="${{ steps.version.outputs.comparison-result }}"
echo "${{ inputs.downstream }}@${{ steps.org.outputs.downstream-version }} ${SEMVER_RESULT} ${{ inputs.upstream }}@${{ steps.upstream.outputs.release }}"
if [ "${SEMVER_RESULT}" == "<" ]; then
Expand All @@ -125,7 +125,7 @@
echo "::notice::downstream ahead"
exit 0
fi
- uses: actions/checkout@v2

Check failure on line 128 in .github/workflows/merge-flow.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue [action] Raw Output: .github/workflows/merge-flow.yaml:128:15: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
with:
repository: ${{ inputs.downstream }}
fetch-depth: 0
Expand Down Expand Up @@ -161,9 +161,11 @@
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
Loading