Skip to content

Commit

Permalink
Fix linter issue in merge-acm-flow
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Baungard Hansen <jacobbaungard@redhat.com>
  • Loading branch information
jacobbaungard committed Sep 19, 2024
1 parent af29ffc commit cac04e2
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/merge-acm-flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ jobs:
- name: Find github org name from repo name
id: org
run: |
echo "upstream=$(dirname ${{ inputs.upstream }})" >> $GITHUB_OUTPUT
echo "downstream=$(dirname ${{ inputs.downstream }})" >> $GITHUB_OUTPUT
echo "sandbox=$(dirname ${{ inputs.sandbox }})" >> $GITHUB_OUTPUT
{
echo "upstream=$(dirname ${{ inputs.upstream }})"
echo "downstream=$(dirname ${{ inputs.downstream }})"
echo "sandbox=$(dirname ${{ inputs.sandbox }})"
} >> "$GITHUB_OUTPUT"
DOWNSTREAM_VERSION=$(curl -sL "https://raw.githubusercontent.com/${{ inputs.downstream }}/${{ inputs.downstream-branch }}/VERSION")
if [[ "${DOWNSTREAM_VERSION}" =~ ^$|"404: Not Found" ]]; then
# Strip the trailing URL from the expression.
Expand All @@ -106,7 +108,7 @@ jobs:
exit 1
fi
fi
echo "downstream-version=${DOWNSTREAM_VERSION}" >> $GITHUB_OUTPUT
echo "downstream-version=${DOWNSTREAM_VERSION}" >> "$GITHUB_OUTPUT"
- uses: madhead/semver-utils@latest
id: version
with:
Expand All @@ -119,14 +121,14 @@ jobs:
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
echo "status=outdated" >> $GITHUB_OUTPUT
echo "status=outdated" >> "$GITHUB_OUTPUT"
echo "::notice::downstream outdated"
elif [ "${SEMVER_RESULT}" == "=" ]; then
echo "status=uptodate" >> $GITHUB_OUTPUT
echo "status=uptodate" >> "$GITHUB_OUTPUT"
echo "::notice::downstream up-to-date"
exit 0
else
echo "status=ahead" >> $GITHUB_OUTPUT
echo "status=ahead" >> "$GITHUB_OUTPUT"
echo "::notice::downstream ahead"
exit 0
fi
Expand All @@ -144,7 +146,7 @@ jobs:
- name: Merge with upstream ${{ steps.upstream.outputs.release }} tag
id: merge
run: |
git merge -X theirs refs/tags/${{ steps.upstream.outputs.release }} --no-edit || echo 'MERGE_CONFLICT=true' >> $GITHUB_OUTPUT
git merge -X theirs refs/tags/${{ steps.upstream.outputs.release }} --no-edit || echo 'MERGE_CONFLICT=true' >> "$GITHUB_OUTPUT"
- name: Resolve conflict using upstream contents
if: ${{ steps.merge.outputs.MERGE_CONFLICT == 'true' && inputs.restore-upstream != ''}}
run: |
Expand Down

0 comments on commit cac04e2

Please sign in to comment.