-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (100 loc) · 2.81 KB
/
mq-cpp.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: message-queue/producer/cpp CI
on:
workflow_dispatch:
inputs:
before:
required: true
type: string
base_image_changed:
required: true
type: string
base_image_tag:
required: true
type: string
telemetry_postgres_changed:
required: true
type: string
telemetry_postgres_tag:
required: true
type: string
postgres_changed:
required: true
type: string
postgres_tag:
required: true
type: string
producer_changed:
required: true
type: string
producer_tag:
required: true
type: string
branch_tag:
required: true
type: string
concurrency:
# Automatically cancel workflows if newer workflow started for the same
# branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
associate-to-commit:
runs-on: ubuntu-latest
steps:
- uses: ./.github/actions/set-status
with:
status: pending
token: ${{ secrets.GITHUB_TOKEN }}
build-producer-cpp-dev:
if: inputs.producer_changed == 'true' ||
inputs.base_image_changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: producer-cpp-dev
dir: message-queue
base_tag: ${{ inputs.base_image_tag }}
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}
build-producer-cpp:
if: inputs.producer_changed == 'true' ||
inputs.base_image_changed == 'true'
needs: build-producer-cpp-dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: producer-cpp
dir: message-queue
base_tag: ${{ inputs.producer_tag }}
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}
test-producer-cpp:
if: ${{ ! failure() && (
inputs.producer_changed ||
inputs.telemetry_postgres_changed ||
inputs.mq_postgres_changed
) }}
needs:
- build-producer-cpp
uses: ./.github/workflows/mq-run-test.yaml
with:
container_tag: ${{ inputs.producer_tag }}
pg_tag: ${{ inputs.mq_postgres_tag }}
telemetry_pg_tag: ${{ inputs.telemetry_postgres_tag }}
name: cpp
secrets: inherit
set-final-status:
runs-on: ubuntu-latest
needs: test-producer-cpp
steps:
- uses: ./.github/actions/set-status
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}