39 lines
990 B
YAML
39 lines
990 B
YAML
name: PR Build
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
IMAGE_PR: git.sebse.de/${{ github.repository }}
|
|
IMAGE_MIGRATE_PR: git.sebse.de/${{ github.repository }}-migrate
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build app
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./web
|
|
push: false
|
|
tags: ${{ env.IMAGE_PR }}:pr-${{ github.event.pull_request.head.sha }}
|
|
cache-from: type=registry,ref=${{ env.IMAGE_PR }}:latest
|
|
|
|
- name: Build migrate
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./web
|
|
file: ./web/Dockerfile.migrate
|
|
push: false
|
|
tags: ${{ env.IMAGE_MIGRATE_PR }}:pr-${{ github.event.pull_request.head.sha }}
|
|
cache-from: type=registry,ref=${{ env.IMAGE_MIGRATE_PR }}:latest
|