Skip to content

Commit

Permalink
ci: Restructured to handle new image building
Browse files Browse the repository at this point in the history
  • Loading branch information
KirilMihaylov committed Apr 8, 2024
1 parent 9226e39 commit c679db7
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ jobs:
fail-fast: true
matrix:
package:
- "alarms-dispatcher"
- "market-data-feeder"
configuration:
- "dev"
- "test"
- "main"
include:
- package: "alarms-dispatcher"
# GitHub Actions escaped string evaluation
name: "Build image [${{ matrix.package }}; ${{ matrix.configuration }}]"
permissions:
Expand All @@ -113,8 +114,8 @@ jobs:
run: |-
set -e
docker build -t "service" -f "./Containerfile" --pull \
--build-arg "package=${package}" \
docker buildx build -t "service" -f "./Containerfile" --pull \
--target "${package}" --build-arg "package=${package}" \
--build-arg "configuration=${configuration}" .
- name: "Login at container registry"
env:
Expand All @@ -123,14 +124,18 @@ jobs:
run: |
set -e
echo "${github_token}" \
| docker login "${container_registry}" --username "\$" \
--password-stdin
echo "${github_token}" | docker login "${container_registry}" \
--username "\$" --password-stdin
- name: "Push image to container registry"
run: |
set -e
readonly image_name="nolus-${package}-${configuration}"
if [ -z "${configuration}" ]
then
readonly image_name="nolus-${package}"
else
readonly image_name="nolus-${package}-${configuration}"
fi
readonly base_url="${container_registry}/${container_repository}"
Expand Down

0 comments on commit c679db7

Please sign in to comment.