Skip to content

Commit 664bab6

Browse files
sbidariO957
andauthored
update internal webpage dispatch (#1252)
* update event type * refactor repository dispatch --------- Co-authored-by: O957 <127630341+O957@users.noreply.github.com>
1 parent 0d7a1e5 commit 664bab6

File tree

3 files changed

+55
-36
lines changed

3 files changed

+55
-36
lines changed

.github/workflows/dispatch-cfa-forecast-hub-reports.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Send Dispatch for ensemble addition"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- 'model-output/CovidHub-ensemble/*'
10+
11+
jobs:
12+
dispatch-webpage-update:
13+
if: ${{ github.repository_owner == 'CDCgov' }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: "Generate Installation Token"
17+
id: get_token_ent
18+
uses: actions/create-github-app-token@v2
19+
with:
20+
app-id: ${{ vars.ENT_GH_APP_ID }}
21+
private-key: ${{ secrets.ENT_GH_APP_KEY }}
22+
owner: cdcent
23+
repositories: cfa-forecast-hub-internal-reports
24+
25+
- name: "Repository Dispatch"
26+
uses: peter-evans/repository-dispatch@v4
27+
with:
28+
token: ${{ steps.get_token_ent.outputs.token }}
29+
repository: cdcent/cfa-forecast-hub-internal-reports
30+
event-type: covid-ensemble-update
31+
32+
dispatch-visualization-data:
33+
if: ${{ github.repository_owner == 'CDCgov' }}
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: "Generate Installation Token"
37+
id: get_token_gov
38+
uses: actions/create-github-app-token@v2
39+
with:
40+
app-id: ${{ vars.GH_APP_ID }}
41+
private-key: ${{ secrets.GH_APP_KEY }}
42+
owner: CDCgov
43+
repositories: cfa-forecast-hub-reports
44+
45+
- name: "Repository Dispatch"
46+
uses: peter-evans/repository-dispatch@v4
47+
with:
48+
token: ${{ steps.get_token_gov.outputs.token }}
49+
repository: CDCgov/cfa-forecast-hub-reports
50+
event-type: ensemble-updated
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Send Dispatch To CFA Forecast Hub Internal Reports"
1+
name: "Send a dispatch for target data update"
22

33
on:
44
workflow_dispatch:
@@ -7,15 +7,14 @@ on:
77
- main
88
paths:
99
- 'target-data/*'
10-
- 'model-output/CovidHub-ensemble/*'
1110

1211
jobs:
13-
update-webpage-data:
12+
update-visualization-data:
1413
if: ${{ github.repository_owner == 'CDCgov' }}
1514
runs-on: ubuntu-latest
1615
steps:
1716
- name: "Generate Installation Token"
18-
id: generate_token
17+
id: get_token
1918
uses: actions/create-github-app-token@v2
2019
with:
2120
app-id: ${{ vars.ENT_GH_APP_ID }}
@@ -26,6 +25,6 @@ jobs:
2625
- name: "Repository Dispatch"
2726
uses: peter-evans/repository-dispatch@v4
2827
with:
29-
token: ${{ steps.generate_token.outputs.token }}
28+
token: ${{ steps.get_token.outputs.token }}
3029
repository: cdcent/cfa-forecast-hub-internal-reports
31-
event-type: data-update
30+
event-type: covid-target-update

0 commit comments

Comments
 (0)