-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 1.76 KB
/
ui-deploy-to-pre-prod-manual.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: 'PRE PROD UI - Deploy and Version Main to Pre-Prod'
on:
workflow_dispatch:
permissions:
pull-requests: write
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
react_testing_job:
name: Run UI Unit Tests
uses: ./.github/workflows/base-jest-test.yml
with:
build_branch: main
cypress_build_job:
name: Build UI version for E2E Tests
uses: ./.github/workflows/base-cypress-build.yml
with:
build_branch: main
cypress_test_job:
name: Run Cypress E2E Tests
needs: [cypress_build_job]
uses: ./.github/workflows/base-cypress-test-all-env.yml
with:
cypress_base_url: ${{ vars.CYPRESS_BASE_URL }}
build_branch: main
tag_and_release:
needs: ["lambda_test_job", "react_testing_job", "cypress_test_job"]
runs-on: ubuntu-latest
outputs:
tag: ${{steps.versioning.outputs.tag}}
new_tag: ${{steps.versioning.outputs.new_tag}}
permissions: write-all
steps:
- uses: actions/checkout@v3
with:
ref: main
fetch-depth: '0'
- name: Bump version and push tag
id: versioning
uses: anothrNick/github-tag-action@1.64.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DEFAULT_BUMP: patch
- name: View outputs
run: |
echo Current tag: ${{steps.versioning.outputs.tag}}
echo New tag: ${{steps.versioning.outputs.new_tag}}
deploy_ui:
name: Deploy UI
needs: ["tag_and_release"]
uses: ./.github/workflows/base-deploy-ui.yml
with:
build_branch: ${{ needs.tag_and_release.outputs.tag }}
environment: pre-prod
sandbox: pre-prod
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}