Skip to content

Commit 6e9c322

Browse files
author
Antoine THEBAUD
committed
Add conditions to change behavior between PR vs main branch
Signed-off-by: Antoine THEBAUD <[email protected]>
1 parent 58b87cc commit 6e9c322

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/dac.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128

129129
# TODO append preview links to PR
130130
- name: Preview the dashboards
131-
if: ${{ !inputs.skip_preview }}
131+
if: ${{ github.event_name == 'pull_request' && !inputs.skip_preview }}
132132
uses: ./actions/preview_dashboards
133133
with:
134134
directory: ./built
@@ -139,15 +139,14 @@ jobs:
139139

140140
# TODO append diff to PR
141141
- name: Generate dashboards diffs
142-
if: ${{ !inputs.skip_diff }}
142+
if: ${{ github.event_name == 'pull_request' && !inputs.skip_diff }}
143143
uses: ./actions/diff_dashboards
144144
with:
145145
directory: ./built
146146
project: ${{ inputs.project }}
147147

148-
# TODO skip deploy if pull request
149148
- name: Deploy the dashboards
150-
if: ${{ !inputs.skip_deploy }}
149+
if: ${{ github.event_name != 'pull_request' && !inputs.skip_deploy }}
151150
uses: ./actions/apply_resources
152151
with:
153152
directory: ./built

0 commit comments

Comments
 (0)