Skip to content

Commit d723b3a

Browse files
authored
Consolidate AB testing workflows (#14702)
* feat: consolidate AB testing workflows and update permissions * run ab test ci if you edit ab-test workflows * naming
1 parent e8f707d commit d723b3a

File tree

5 files changed

+28
-35
lines changed

5 files changed

+28
-35
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
jobs:
2121
checks:
2222
runs-on: ubuntu-latest
23+
name: Checks
2324
defaults:
2425
run:
2526
working-directory: ab-testing

.github/workflows/ab-testing-deploy-code.yml renamed to .github/workflows/ab-testing-ci-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 🧪 Deploy CODE AB Testing Config
1+
name: 🧪 AB testing CI (CODE)
22

33
permissions:
44
contents: read

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

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,31 @@ on:
77
pull_request:
88
paths:
99
- 'ab-testing/**'
10+
- '.github/workflows/ab-testing-*.yml'
11+
push:
12+
branches:
13+
- main
14+
paths:
15+
- 'ab-testing/**'
16+
- '.github/workflows/ab-testing-*.yml'
1017

1118
jobs:
12-
checks:
19+
ci:
20+
name: CI
1321
uses: ./.github/workflows/ab-testing-checks.yml
22+
with:
23+
save_build_artifact: true
24+
secrets:
25+
FASTLY_AB_TESTING_CONFIG: ${{ secrets.FASTLY_PROD_AB_TESTING_CONFIG }}
26+
FASTLY_API_TOKEN: ${{ secrets.FASTLY_PROD_API_TOKEN }}
27+
28+
deploy:
29+
name: Deploy
30+
needs: ci
31+
if: github.ref == 'refs/heads/main'
32+
uses: ./.github/workflows/ab-testing-deploy.yml
33+
with:
34+
stage: prod
1435
secrets:
15-
FASTLY_AB_TESTING_CONFIG: ${{ secrets.FASTLY_CODE_AB_TESTING_CONFIG }}
16-
FASTLY_API_TOKEN: ${{ secrets.FASTLY_CODE_API_TOKEN }}
36+
FASTLY_AB_TESTING_CONFIG: ${{ secrets.FASTLY_PROD_AB_TESTING_CONFIG }}
37+
FASTLY_API_TOKEN: ${{ secrets.FASTLY_PROD_API_TOKEN }}

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

Lines changed: 0 additions & 31 deletions
This file was deleted.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ on:
33
pull_request:
44
paths:
55
- 'ab-testing/**'
6+
- '.github/workflows/ab-testing-*.yml'
67
push:
78
branches:
89
- main
910
paths:
1011
- 'ab-testing/**'
12+
- '.github/workflows/ab-testing-*.yml'
1113

1214
jobs:
1315
build-ui:

0 commit comments

Comments
 (0)