Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(.github/workflows): just copy the common jobs
Browse files Browse the repository at this point in the history
The called workflow is not going to work due to the GHA job queue in
concurrency group being capped at 1.

At that point, there is no point in using called workflow. Its actually
worse because e.g. rust does not need to depend on base-debian.

refs: #61
jan-matejka committed Jan 2, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 7fbc2fd commit f0feda0
Showing 6 changed files with 114 additions and 56 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/mq-cpp.yaml
Original file line number Diff line number Diff line change
@@ -13,14 +13,35 @@ concurrency:
cancel-in-progress: true

jobs:
common:
build-base-debian:
if: true
uses: ./.github/workflows/mq-infra.yaml
secrets: inherit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: base-debian
dir: message-queue
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-postgres:
if: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: message-queue
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-producer-cpp-dev:
if: true
needs: common
needs: build-base-debian
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -52,7 +73,7 @@ jobs:
if: true
needs:
- build-producer-cpp
- common
- build-postgres
uses: ./.github/workflows/mq-run-test.yaml
with:
name: cpp
31 changes: 26 additions & 5 deletions .github/workflows/mq-golang.yaml
Original file line number Diff line number Diff line change
@@ -13,14 +13,35 @@ concurrency:
cancel-in-progress: true

jobs:
common:
build-base-debian:
if: true
uses: ./.github/workflows/mq-infra.yaml
secrets: inherit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: base-debian
dir: message-queue
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-postgres:
if: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: message-queue
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-producer-golang-dev:
if: true
needs: common
needs: build-base-debian
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -52,7 +73,7 @@ jobs:
if: true
needs:
- build-producer-golang
- common
- build-postgres
uses: ./.github/workflows/mq-run-test.yaml
with:
name: golang
27 changes: 24 additions & 3 deletions .github/workflows/mq-haskell.yaml
Original file line number Diff line number Diff line change
@@ -13,10 +13,31 @@ concurrency:
cancel-in-progress: true

jobs:
common:
build-base-debian:
if: true
uses: ./.github/workflows/mq-infra.yaml
secrets: inherit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: base-debian
dir: message-queue
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-postgres:
if: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: message-queue
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-base-haskell:
if: true
34 changes: 0 additions & 34 deletions .github/workflows/mq-infra.yaml

This file was deleted.

31 changes: 26 additions & 5 deletions .github/workflows/mq-python.yaml
Original file line number Diff line number Diff line change
@@ -13,14 +13,35 @@ concurrency:
cancel-in-progress: true

jobs:
common:
build-base-debian:
if: true
uses: ./.github/workflows/mq-infra.yaml
secrets: inherit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: base-debian
dir: message-queue
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-postgres:
if: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: message-queue
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-producer-python-dev:
if: true
needs: common
needs: build-base-debian
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -52,7 +73,7 @@ jobs:
if: true
needs:
- build-producer-python
- common
- build-postgres
uses: ./.github/workflows/mq-run-test.yaml
with:
name: python
16 changes: 12 additions & 4 deletions .github/workflows/mq-rust.yaml
Original file line number Diff line number Diff line change
@@ -13,10 +13,18 @@ concurrency:
cancel-in-progress: true

jobs:
common:
build-postgres:
if: true
uses: ./.github/workflows/mq-infra.yaml
secrets: inherit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/build-image"
with:
image: postgres
dir: message-queue
registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }}
registry_pass: ${{ secrets.GITHUB_TOKEN }}

build-base-debian-testing:
if: true
@@ -65,7 +73,7 @@ jobs:
if: true
needs:
- build-producer-rust
- common
- build-postgres
uses: ./.github/workflows/mq-run-test.yaml
with:
name: rust

0 comments on commit f0feda0

Please sign in to comment.