Skip to content

Commit

Permalink
.github/workflows/message-queue-ci.yaml:
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-matejka committed Dec 25, 2024
1 parent b457c4a commit 1af859c
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/message-queue-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,26 @@ jobs:
# IMAGE: image name when referring to it through podman-compose
IMAGE: base-debian
PROJECT: code-golf_message-queue
IMAGE_FULL: code-golf_message-queue
steps:
- name: Set env vars
# https://brandur.org/fragments/github-actions-env-vars-in-env-vars
# IMAGE_FULL: full image name as created by podman-compose (with
# project name prepended)
run: echo "IMAGE_FULL=$PROJECT_$IMAGE" >> "$GITHUB_ENV"


- name: show env
run: env

- uses: actions/checkout@v4

- name: Install podman-compose
run: pip3 install podman-compose
# Ubuntu also uses too old (1.0.6) version
# run: sudo apt-get install -y podman-compose
# Ubuntu also uses too old (1.0.6) version
# run: sudo apt-get install -y podman-compose

- name: Print podman-compose version
run: podman-compose version
- name: Build image
run: cd message-queue &&
podman-compose
-p $PROJECT
--podman-build-args "-t $IMAGE_FULL:${{ github.sha }}"
build "$IMAGE"

- name: Log in to the Github Container registry
uses: redhat-actions/podman-login@v1
Expand All @@ -47,10 +46,17 @@ jobs:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASS }}

- name: Build image
run: cd message-queue &&
podman-compose
-p $PROJECT
--podman-build-args "-t $IMAGE_FULL:${{ github.sha }}"
build "$IMAGE"

- name: Push image
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE_FULL }}
image: ${{ env.PROJECT }}_${{ env.IMAGE }}
tags: ${{ github.sha }}
registry: ${{ env.REGISTRY_URL }}
username: ${{ env.REGISTRY_USER }}
Expand Down

0 comments on commit 1af859c

Please sign in to comment.