-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ci-cd): integrate reusable workflows for image publishing in…
… ci pipelines
- Loading branch information
1 parent
7fed0f5
commit 482cc3c
Showing
15 changed files
with
295 additions
and
524 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Anubis - Build Docker image and publish to GHCR and Docker Hub | ||
|
||
on: | ||
push: | ||
tags: | ||
- "anubis/**" | ||
|
||
env: | ||
NAMESPACE: pantheonix | ||
REPOSITORY: anubis | ||
IMAGE_NAME: anubis-eval | ||
BUILD_CONTEXT: anubis-eval | ||
|
||
jobs: | ||
build: | ||
name: Build and Test Anubis Eval Microservice | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: anubis-eval | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run docker-compose | ||
uses: hoverkraft-tech/[email protected] | ||
with: | ||
compose-file: "./anubis-eval/tests-setup/docker-compose.yaml" | ||
up-flags: "--build -d" | ||
|
||
- name: Setup rust | ||
uses: hecrj/setup-rust-action@v2 | ||
with: | ||
rust-version: '1.72.0' | ||
|
||
- name: Install cargo-nextest | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: cargo-nextest | ||
version: '0.9.64' | ||
locked: true | ||
|
||
- name: Build | ||
run: cargo build --release | ||
|
||
- name: Test | ||
run: cargo nextest run --all-features --profile ci | ||
|
||
deploy_to_ghcr: | ||
needs: build | ||
uses: ./.github/workflows/step-deploy-to-ghcr.yaml | ||
with: | ||
image_name: ${{ env.IMAGE_NAME }} | ||
build_context: ${{ env.BUILD_CONTEXT }} | ||
|
||
deploy_to_docker_hub: | ||
needs: build | ||
uses: ./.github/workflows/step-deploy-to-docker-hub.yaml | ||
with: | ||
namespace: ${{ env.NAMESPACE }} | ||
repository: ${{ env.REPOSITORY }} | ||
build_context: ${{ env.BUILD_CONTEXT }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Dapr - Build Docker image and publish to GHCR and Docker Hub | ||
|
||
on: | ||
push: | ||
tags: | ||
- "dapr/**" | ||
|
||
env: | ||
NAMESPACE: pantheonix | ||
REPOSITORY: asgard-dapr | ||
IMAGE_NAME: asgard-dapr-config | ||
BUILD_CONTEXT: dapr | ||
|
||
jobs: | ||
deploy_to_ghcr: | ||
uses: ./.github/workflows/step-deploy-to-ghcr.yaml | ||
with: | ||
image_name: ${{ env.IMAGE_NAME }} | ||
build_context: ${{ env.BUILD_CONTEXT }} | ||
|
||
deploy_to_docker_hub: | ||
uses: ./.github/workflows/step-deploy-to-docker-hub.yaml | ||
with: | ||
namespace: ${{ env.NAMESPACE }} | ||
repository: ${{ env.REPOSITORY }} | ||
build_context: ${{ env.BUILD_CONTEXT }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Enki - Build Docker image and publish to GHCR and Docker Hub | ||
|
||
on: | ||
push: | ||
tags: | ||
- "enki/**" | ||
|
||
env: | ||
NAMESPACE: pantheonix | ||
REPOSITORY: enki | ||
IMAGE_NAME: enki-problems | ||
BUILD_CONTEXT: enki-problems | ||
|
||
jobs: | ||
build: | ||
name: Build and Test Enki Problems Microservice | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: enki-problems | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '7.0.x' | ||
- name: Build | ||
run: | | ||
dotnet restore "src/EnkiProblems.HttpApi.Host/EnkiProblems.HttpApi.Host.csproj" | ||
dotnet restore "test/EnkiProblems.Application.Tests/EnkiProblems.Application.Tests.csproj" | ||
dotnet build --no-restore | ||
- name: Test | ||
run: dotnet test -e DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false | ||
|
||
deploy_to_ghcr: | ||
needs: build | ||
uses: ./.github/workflows/step-deploy-to-ghcr.yaml | ||
with: | ||
image_name: ${{ env.IMAGE_NAME }} | ||
build_context: ${{ env.BUILD_CONTEXT }} | ||
|
||
deploy_to_docker_hub: | ||
needs: build | ||
uses: ./.github/workflows/step-deploy-to-docker-hub.yaml | ||
with: | ||
namespace: ${{ env.NAMESPACE }} | ||
repository: ${{ env.REPOSITORY }} | ||
build_context: ${{ env.BUILD_CONTEXT }} |
Oops, something went wrong.