message-queue/producer/cpp CI #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
jobs: | |
associate-to-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 == 'true' || | |
inputs.telemetry_postgres_changed == 'true' || | |
inputs.postgres_changed == 'true' | |
) }} | |
needs: | |
- build-producer-cpp | |
uses: ./.github/workflows/mq-run-test.yaml | |
with: | |
container_tag: ${{ inputs.producer_tag }} | |
pg_tag: ${{ inputs.postgres_tag }} | |
telemetry_pg_tag: ${{ inputs.telemetry_postgres_tag }} | |
name: cpp | |
secrets: inherit | |
set-final-status: | |
runs-on: ubuntu-latest | |
if: always() | |
needs: test-producer-cpp | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/set-status | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: ${{ job.status }} |