Skip to content

Commit 6a9e663

Browse files
committed
Add label action
1 parent 6e02df4 commit 6a9e663

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/mockzilla.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
types: [opened, synchronize, reopened, closed]
7+
types: [labeled, synchronize, reopened, closed]
88

99
permissions:
1010
contents: read
@@ -13,6 +13,7 @@ permissions:
1313
jobs:
1414
publish:
1515
runs-on: ubuntu-latest
16+
if: contains(github.event.pull_request.labels.*.name, 'Mockzilla')
1617
steps:
1718
- uses: actions/checkout@v4
1819

.github/workflows/setup.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Setup
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
7+
permissions:
8+
labels: write
9+
10+
jobs:
11+
create-labels:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Create Mockzilla label
15+
env:
16+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
GH_REPO: ${{ github.repository }}
18+
run: |
19+
gh label create "Mockzilla" --color "0075ca" --description "Trigger Mockzilla publish" 2>/dev/null || true

0 commit comments

Comments
 (0)