Skip to content

Commit f5ed139

Browse files
committed
need the build artifact
1 parent b5d27cd commit f5ed139

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

.github/workflows/ab-testing-checks.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ permissions:
55

66
on:
77
workflow_call:
8+
inputs:
9+
save_build_artifact:
10+
description: 'Whether to save the built files as an artifact'
11+
required: false
12+
type: boolean
13+
default: false
814
secrets:
915
FASTLY_AB_TESTING_CONFIG:
1016
required: true
@@ -36,3 +42,9 @@ jobs:
3642

3743
- name: Build
3844
run: deno task build
45+
46+
- if: ${{ inputs.save_build_artifact }}
47+
uses: actions/[email protected]
48+
with:
49+
name: ab-testing-build
50+
path: ab-testing/dist

.github/workflows/ab-testing-deploy-code.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
jobs:
1010
ci:
1111
uses: ./.github/workflows/ab-testing-checks.yml
12+
with:
13+
save_build_artifact: true
1214
secrets:
1315
FASTLY_AB_TESTING_CONFIG: ${{ secrets.FASTLY_CODE_AB_TESTING_CONFIG }}
1416
FASTLY_API_TOKEN: ${{ secrets.FASTLY_CODE_API_TOKEN }}

.github/workflows/ab-testing-deploy-prod.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414
jobs:
1515
ci:
1616
uses: ./.github/workflows/ab-testing-checks.yml
17+
with:
18+
save_build_artifact: true
1719
secrets:
1820
FASTLY_AB_TESTING_CONFIG: ${{ secrets.FASTLY_PROD_AB_TESTING_CONFIG }}
1921
FASTLY_API_TOKEN: ${{ secrets.FASTLY_PROD_API_TOKEN }}

.github/workflows/ab-testing-deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
with:
3232
deno-version: v2.3
3333

34+
- name: Download build artifact
35+
uses: actions/[email protected]
36+
with:
37+
name: ab-testing-build
38+
path: ab-testing/dist
39+
3440
- name: Deploy
3541
run: deno run deploy
3642
env:

0 commit comments

Comments
 (0)