forked from binary-com/deriv-com
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.15 KB
/
translation-pre-delete.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Pre-delete Translation
permissions:
actions: write
checks: write
contents: write
deployments: write
pull-requests: write
statuses: write
on:
pull_request:
types: [closed]
branches:
- 'master*'
env:
BRANCH: ${{ github.head_ref }}
jobs:
check-translation-branch:
runs-on: ubuntu-latest
if: |
(startsWith(github.head_ref, 'translation') || startsWith(github.head_ref, 'stp')) &&
!contains(github.head_ref, '!') &&
!contains(github.head_ref, '@') &&
!contains(github.head_ref, '#') &&
!contains(github.head_ref, '$') &&
!contains(github.head_ref, '%') &&
!contains(github.head_ref, '^') &&
!contains(github.head_ref, '&') &&
!contains(github.head_ref, '*') &&
!contains(github.head_ref, '(') &&
!contains(github.head_ref, ')')
steps:
- name: Branch Check 🔍
run: |
CLEAN_BRANCH="${BRANCH//[^[:alnum:]-_]/}"
echo "$CLEAN_BRANCH is valid branch for translation workflow"