Skip to content

Commit 62ce497

Browse files
committed
fix: workflow skips dev/staging/master branches
1 parent b0444ff commit 62ce497

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/non-english-warning.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,24 @@ jobs:
1111
check_branch_name:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Exit early if branch name contains 'crowdin'
14+
- name: Exit early if branch name contains 'crowdin' or is 'dev', 'staging', or 'master'
15+
id: check
1516
run: |
16-
if [[ "${{ github.head_ref }}" == *crowdin* ]]; then
17-
echo "Branch name contains 'crowdin', stopping workflow"
18-
exit 1
17+
if [[ "${{ github.head_ref }}" == *crowdin* ]] ||
18+
[[ "${{ github.ref }}" == 'refs/heads/dev' ]] ||
19+
[[ "${{ github.ref }}" == 'refs/heads/staging' ]] ||
20+
[[ "${{ github.ref }}" == 'refs/heads/master' ]]
21+
then
22+
echo "Branch name contains 'crowdin' or is 'dev', 'staging', or 'master', stopping workflow"
23+
echo "::set-output name=skip::true"
24+
exit 0
25+
else
26+
echo "::set-output name=skip::false"
1927
fi
2028
2129
check_changes:
2230
needs: check_branch_name
31+
if: needs.check_branch_name.outputs.skip == 'false'
2332
runs-on: ubuntu-latest
2433
outputs:
2534
all_changes_include_href: ${{ steps.check.outputs.all_changes_include_href }}

0 commit comments

Comments
 (0)