Skip to content

build images

build images #2

Workflow file for this run

name: Build and Push
on:
push:
branches:
- master
workflow_dispatch:
env:
FRAMEWORK: net8.0
RUNTIME: linux-x64
CONFIGURATION: Release
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run tests
run: dotnet test --configuration $CONFIGURATION Estimmo.Test/Estimmo.Test.csproj
- name: Publish
run: dotnet publish -r:$RUNTIME -f:$FRAMEWORK -c:$CONFIGURATION Estimmo.sln
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push PostGIS image
uses: docker/build-push-action@v5
with:
push: true
context: docker/postgis
file: docker/postgis/Dockerfile
tags: ghcr.io/jamie-mh/estimmo-postgis:latest
- name: Build and push API image
uses: docker/build-push-action@v5
with:
push: true
context: .
file: docker/api/Dockerfile
tags: ghcr.io/jamie-mh/estimmo-api:latest