Skip to content

build and publish the spin images #15

build and publish the spin images

build and publish the spin images #15

Workflow file for this run

name: build and publish the docker images
on:
push:
branches: [ "main" ]
tags:
- 'v*'
env:
REGISTRY: ghcr.io
jobs:
build-and-publish-docker-images:
runs-on: ubuntu-latest
strategy:
matrix:
image: [api, web]
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v4
with:
context: ./${{ matrix.image }}
file: ./${{ matrix.image }}/dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.repository }}/${{ matrix.image }}:${{ github.ref_name }}