Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: workflow skips dev/staging/master branches #13020

Merged
merged 4 commits into from
May 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/non-english-warning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,24 @@ jobs:
check_branch_name:
runs-on: ubuntu-latest
steps:
- name: Exit early if branch name contains 'crowdin'
- name: Exit early if branch name contains 'crowdin' or is 'dev', 'staging', or 'master'
id: check
run: |
if [[ "${{ github.head_ref }}" == *crowdin* ]]; then
echo "Branch name contains 'crowdin', stopping workflow"
exit 1
if [[ "${{ github.head_ref }}" == *crowdin* ]] ||
[[ "${{ github.ref }}" == 'refs/heads/dev' ]] ||
[[ "${{ github.ref }}" == 'refs/heads/staging' ]] ||
[[ "${{ github.ref }}" == 'refs/heads/master' ]]
then
echo "Branch name contains 'crowdin' or is 'dev', 'staging', or 'master', stopping workflow"
echo "::set-output name=skip::true"
exit 0
else
echo "::set-output name=skip::false"
wackerow marked this conversation as resolved.
Show resolved Hide resolved
fi

check_changes:
needs: check_branch_name
if: needs.check_branch_name.outputs.skip == 'false'
wackerow marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
outputs:
all_changes_include_href: ${{ steps.check.outputs.all_changes_include_href }}
Expand Down
Loading