Skip to content

Commit f7e2aa4

Browse files
committed
chore: Allow triggering of release workflow via webhook
1 parent d42a13e commit f7e2aa4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
name: Release
44

55
on:
6+
repository_dispatch:
7+
types: [run-release]
68
push:
79
branches:
810
- main

.github/workflows/visual-regression.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
push:
88
branches:
99
- main
10+
workflow_run:
11+
workflows: [Release]
12+
types: [completed]
1013

1114
env:
1215
VISUAL_REGRESSION_SNAPSHOT_DIRECTORY: "__image_snapshots__"
@@ -15,7 +18,7 @@ jobs:
1518
test:
1619
name: Run Tests
1720
runs-on: ubuntu-latest
18-
if: github.event.ref != 'refs/heads/main'
21+
if: (github.event.ref || github.event.workflow_run.head_branch) != 'refs/heads/main'
1922
steps:
2023
- uses: actions/checkout@v4
2124
- uses: actions/setup-node@v4
@@ -44,7 +47,7 @@ jobs:
4447
update:
4548
name: Update Snapshots
4649
runs-on: ubuntu-latest
47-
if: github.event.ref == 'refs/heads/main'
50+
if: (github.event.ref || github.event.workflow_run.head_branch) != 'refs/heads/main'
4851
steps:
4952
- uses: actions/checkout@v4
5053
- uses: actions/setup-node@v4

0 commit comments

Comments
 (0)