Staging #5
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: Master Protection | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- 'master' | |
jobs: | |
check-pr-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Workflow run cleanup action | |
uses: rokroskar/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/[email protected] | |
- name: Check Tag | |
run: | | |
stringContain() { [ -z "$1" ] || { [ -z "${2##*$1*}" ] && [ -n "$2" ];};} | |
if stringContain ${{github.head_ref}} 'staging' || stringContain ${{github.head_ref}} 'hotfix'; then exit 0; else exit 1; fi |