split images, pull more env vars out

This commit is contained in:
greg2010 2022-08-02 00:36:56 -04:00
parent 6ea4fa0026
commit 804a5229ab
No known key found for this signature in database
GPG key ID: 900A237110AFCA71
10 changed files with 78 additions and 46 deletions

View file

@ -6,11 +6,19 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME_OWNER: ${{ github.repository_owner }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./pathfinder.Dockerfile
image_name: pathfinder
- dockerfile: ./pf-websocket.Dockerfile
image_name: pf-websocket
permissions:
contents: read
packages: write
@ -29,11 +37,12 @@ jobs:
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_OWNER }}/${{ matrix.image_name }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}