Skip to content

DM-39022: Add group name presence server. #254

DM-39022: Add group name presence server.

DM-39022: Add group name presence server. #254

Workflow file for this run

name: CI build of all containers
on:
push:
branches:
- main
tags:
- v*
pull_request:
env:
ENQUEUE_NAME: embargo-butler-enqueue
INGEST_NAME: embargo-butler-ingest
IDLE_NAME: embargo-butler-idle
PRESENCE_NAME: embargo-butler-presence
jobs:
push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build enqueue image
run: |
docker build . \
-f Dockerfile.enqueue \
--tag $ENQUEUE_NAME \
--label "runnumber=${GITHUB_RUN_ID}"
- name: Build ingest image
run: |
docker build . \
-f Dockerfile.ingest \
--tag $INGEST_NAME \
--label "runnumber=${GITHUB_RUN_ID}"
- name: Build idle image
run: |
docker build . \
-f Dockerfile.idle \
--tag $IDLE_NAME \
--label "runnumber=${GITHUB_RUN_ID}"
- name: Build presence image
run: |
docker build . \
-f Dockerfile.presence \
--tag $PRESENCE_NAME \
--label "runnumber=${GITHUB_RUN_ID}"
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Push images
run: |
ENQUEUE_ID=ghcr.io/${{ github.repository_owner }}/$ENQUEUE_NAME
INGEST_ID=ghcr.io/${{ github.repository_owner }}/$INGEST_NAME
IDLE_ID=ghcr.io/${{ github.repository_owner }}/$IDLE_NAME
PRESENCE_ID=ghcr.io/${{ github.repository_owner }}/$PRESENCE_NAME
if [[ "${{ github.ref }}" == "refs/pull/"* ]]; then
VERSION=$(echo "${{ github.head_ref }}" | sed -e 's|.*/||')
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
VERSION=$(echo "${{ github.ref_name }}" | sed -e 's|^v||')
else
VERSION=latest
fi
echo ENQUEUE_ID=$ENQUEUE_ID
echo INGEST_ID=$INGEST_ID
echo IDLE_ID=$IDLE_ID
echo PRESENCE_ID=$PRESENCE_ID
echo VERSION=$VERSION
docker tag $ENQUEUE_NAME $ENQUEUE_ID:$VERSION
docker push $ENQUEUE_ID:$VERSION
docker tag $INGEST_NAME $INGEST_ID:$VERSION
docker push $INGEST_ID:$VERSION
docker tag $IDLE_NAME $IDLE_ID:$VERSION
docker push $IDLE_ID:$VERSION
docker tag $PRESENCE_NAME $PRESENCE_ID:$VERSION
docker push $PRESENCE_ID:$VERSION