try to check out head #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check config.xml version | |
on: | |
push: | |
branches: | |
- 'feature/PLUG-155' | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Set OLD_VERSION from etc/config.xml if merge would modify it | |
run: | | |
echo "OLD_VERSION=$(git log main..HEAD --cherry -p -- etc/config.xml | grep '\-.\s*.\<version\>' | tr -d '\-[:blank:]\n' | sed -e 's/<version>\(.*\)<\/version>/\1/')" >> $GITHUB_ENV | |
- name: Set NEW_VERSION from etc/config.xml if merge would modify it | |
run: | | |
echo "NEW_VERSION=$(git log main..HEAD --cherry -p -- etc/config.xml | grep '\+.\s*.\<version\>' | tr -d '+[:blank:]\n' | sed -e 's/<version>\(.*\)<\/version>/\1/')" >> $GITHUB_ENV | |
- name: Test that versions are not empty | |
run: | | |
[[ ! -z $OLD_VERSION ]] && [[ ! -z $NEW_VERSION ]] | |
- name: Test that versions are different | |
run: | | |
[[ $OLD_VERSION != $NEW_VERSION ]] |