-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (48 loc) · 1.57 KB
/
trigger-website-fe-build.yml
File metadata and controls
52 lines (48 loc) · 1.57 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
name: Trigger website relaunch frontend
on:
push:
branches: [dev]
paths:
- 'wiki/**'
release:
types: [published]
env:
TARGET_OWNER: 42core-team
TARGET_REPO: website_relaunch
TARGET_WORKFLOW_FILE: frontend-build.yml
TARGET_REF: dev
jobs:
dispatch-dev:
name: Dispatch DEV deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
runs-on: ubuntu-24.04
steps:
- name: Call workflow_dispatch in website_relaunch (dev)
uses: actions/github-script@v8
with:
github-token: ${{ secrets.WSR_PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: process.env.TARGET_OWNER,
repo: process.env.TARGET_REPO,
workflow_id: process.env.TARGET_WORKFLOW_FILE,
ref: 'dev',
inputs: { environment: 'dev', force_rebuild: true }
});
dispatch-prod:
name: Dispatch PROD deploy
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-24.04
steps:
- name: Call workflow_dispatch in website_relaunch (prod)
uses: actions/github-script@v8
with:
github-token: ${{ secrets.WSR_PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: process.env.TARGET_OWNER,
repo: process.env.TARGET_REPO,
workflow_id: process.env.TARGET_WORKFLOW_FILE,
ref: 'main',
inputs: { environment: 'prod', force_rebuild: true }
});