-
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.
* Simplify queue init * Add docker compose file for rabbitmq dev setup * Make queues generic * Externalize queue payload * Add enqueue functionallity to API * Add dequeue functionallity to scheduler * Remove generics for now * Add Github Action file * Fix matrix build paths * Remove buggy env configuration from dockerfiles * Revert last commit * Add docker compose file * Update image tags * Update image tags --------- Co-authored-by: Robert Jandow <[email protected]>
- Loading branch information
1 parent
07d7978
commit 946342f
Showing
4 changed files
with
88 additions
and
12 deletions.
There are no files selected for viewing
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,64 @@ | ||
name: Build Docker Images | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- dockerfile: ./HadesAPI/Dockerfile | ||
image: ghcr.io/mtze/hades/hades-api | ||
- dockerfile: ./HadesScheduler/Dockerfile | ||
image: ghcr.io/mtze/hades/hades-schduler-k8s | ||
steps: | ||
- name: Compute Tag | ||
uses: actions/github-script@v6 | ||
id: compute-tag | ||
with: | ||
result-encoding: string | ||
script: | | ||
if (context.eventName === "pull_request") { | ||
return "pr-" + context.issue.number; | ||
} | ||
if (context.eventName === "push") { | ||
if (context.ref.startsWith("refs/tags/")) { | ||
return context.ref.slice(10); | ||
} | ||
if (context.ref === "refs/heads/develop") { | ||
return "develop"; | ||
} | ||
} | ||
return "latest"; | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
|
||
- name: Install Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push Docker Image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: ${{ matrix.dockerfile }} | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ matrix.image }}:${{ steps.compute-tag.outputs.result }} |
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
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
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,16 @@ | ||
# docker compose file for the project with three services | ||
|
||
version: '3.7' | ||
services: | ||
hadesAPI: | ||
image: hades-api | ||
build: | ||
context: . | ||
dockerfile: ./HadesAPI/Dockerfile | ||
ports: | ||
- "8080:8080" | ||
hadesScheduler: | ||
image: hades-scheduler | ||
build: | ||
context: . | ||
dockerfile: ./HadesScheduler/Dockerfile |