-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (75 loc) · 2.25 KB
/
ci-test.yaml
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
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
pull_request:
permissions:
contents: read
jobs:
get-version:
name: Get latest app version
runs-on: ubuntu-latest
outputs:
api: ${{ steps.api-version.outputs.version }}
selfserve: ${{ steps.selfserve-version.outputs.version }}
internal: ${{ steps.internal-version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- id: api-version
uses: ./.github/actions/get-app-version
with:
project-path: app/api
- id: selfserve-version
uses: ./.github/actions/get-app-version
with:
project-path: app/selfserve
- id: internal-version
uses: ./.github/actions/get-app-version
with:
project-path: app/internal
- name: Add to summary
run: |
echo "#### App versions:" >> $GITHUB_STEP_SUMMARY
echo "**API**: \`${{ steps.api-version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Selfserve**: \`${{ steps.selfserve-version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Internal**: \`${{ steps.internal-version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
app:
name: App
concurrency:
group: app-${{ matrix.project }}-${{ needs.get-version.outputs[matrix.project] }}
needs:
- get-version
strategy:
fail-fast: false
matrix:
project:
- internal
uses: ./.github/workflows/php.yaml
with:
project: ${{ matrix.project }}
should-upload-artefact: true
artefact-name: app-${{ matrix.project}}-${{ needs.get-version.outputs[matrix.project] }}
retention-days: 1
permissions:
contents: read
docker:
name: Docker
needs:
- app
- get-version
concurrency:
group: docker-${{ matrix.project }}-test
strategy:
fail-fast: false
matrix:
project:
- internal
uses: ./.github/workflows/docker.yaml
with:
project: ${{ matrix.project }}
app-artefact-name: app-${{ matrix.project}}-${{ needs.get-version.outputs[matrix.project] }}
should-upload-artefact-to-ecr: true
permissions:
contents: read
id-token: write