Beta release #101
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: pr-validator | |
on: | |
pull_request: | |
types: [synchronize, opened, reopened, edited] | |
branches: | |
- main | |
- beta | |
jobs: | |
pr-validation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
if [ "$TARGET_BRANCH" == "main" ] && [ "$SOURCE_BRANCH" == "beta" ]; then | |
echo "Merge from $SOURCE_BRANCH to $TARGET_BRANCH is valid" | |
exit 0 | |
elif [ "$TARGET_BRANCH" == "beta" ] && [ "$SOURCE_BRANCH" == "alpha" ]; then | |
echo "Merge from $SOURCE_BRANCH to $TARGET_BRANCH is valid" | |
exit 0 | |
else | |
echo "You cannot merge from $SOURCE_BRANCH to $TARGET_BRANCH" | |
exit 1 | |
fi | |
env: | |
SOURCE_BRANCH: ${{ github.head_ref }} | |
TARGET_BRANCH: ${{ github.base_ref }} |