Skip to content

Commit

Permalink
get message [breaking]
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Aug 4, 2024
1 parent 708eb3f commit e57a10f
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,17 @@ jobs:
uses: actions/checkout@v3

# should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title)
# echo "LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV}
# echo LAST_COMMIT_HEAD_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV}
# echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}}
# echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}

- name: upgrade - should be backwards compatible
run: |
echo "LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV}
echo LAST_COMMIT_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV}
echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}}
echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}
echo LAST_COMMIT: ${{ env.LAST_COMMIT }}
echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }}
echo LAST_COMMIT_HEAD_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV}
echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV}
echo github.head_ref: ${{ github.head_ref }}
echo ${{contains(github.head_ref, 'breaking-')}}
echo github.ref : ${{ github.ref }}
echo ${{contains(github.ref, 'breaking-')}}
echo github.ref_name: ${{ github.ref_name }}
echo ${{contains(github.ref_name, 'breaking-')}}
echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV}
- name: should run
Expand Down

0 comments on commit e57a10f

Please sign in to comment.