Skip to content

Commit

Permalink
build: try to fix fast-forward workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
boholder committed May 19, 2024
1 parent 906488c commit a414b04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/fast_forward.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:

- name: Set environment variables
run: |
MERGE_STATUS=${{ fromJson(steps.get-pr-details.outputs.data).mergeable_state }}
if [ "$MERGE_STATUS" != "clean" ]; then echo "COMMENT=[Fast Forward CI] ${{ env.HEAD_REF }} cannot be merged into ${{ env.BASE_REF }} at the moment." >> $GITHUB_ENV; fi
MERGE_STATUS=${{ fromJson(steps.get-pr-details.outputs.data).mergeable }}
if [ "$MERGE_STATUS" != "true" ]; then echo "COMMENT=[Fast Forward CI] ${{ env.HEAD_REF }} cannot be merged into ${{ env.BASE_REF }} at the moment." >> $GITHUB_ENV; fi
echo "MERGE_STATUS=$MERGE_STATUS" >> $GITHUB_ENV
echo "BASE_REF=${{ fromJson(steps.get-pr-details.outputs.data).base.ref }}" >> $GITHUB_ENV
echo "HEAD_REF=${{ fromJson(steps.get-pr-details.outputs.data).head.ref }}" >> $GITHUB_ENV
Expand All @@ -62,7 +62,7 @@ jobs:
# Only runs if the merge status is "clean", clean might refer to when the merge button is green in the PR's page, there's no clear indication of it's values in docs
# For forks the following script adds the fork as a remote, them merges it into base
- name: Merge the head branch into base in a fast forward manner only
if: ${{ env.MERGE_STATUS == 'clean' }}
if: ${{ env.MERGE_STATUS == 'true' }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
Expand Down

0 comments on commit a414b04

Please sign in to comment.