Skip to content

Publish container images #4

Publish container images

Publish container images #4

Workflow file for this run

name: Publish container images
on:
workflow_dispatch:
env:
REGISTRY: ${{ vars.CONTAINER_REGISTRY }}
OWNER: idemsinternational
jobs:
publish:
strategy:
matrix:
image:
- enketo
- nginx
- secrets
- service
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
IMAGE_TAG: $REGISTRY/$OWNER/${{ matrix.image }}:$GITHUB_REF_NAME
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login $REGISTRY -u $ --password-stdin
- name: Build
run: docker build --tag $IMAGE_TAG -f ${{ matrix.image }}.dockerfile .
- name: Publish
run: docker push $IMAGE_TAG