Skip to content

Commit 8121f60

Browse files
author
github-copilot
committed
chore: add PR preview image build workflow
1 parent 73ee143 commit 8121f60

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PR Preview Build
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
build-preview-image:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.10'
18+
- name: Install test deps
19+
run: python -m pip install --upgrade pip pytest
20+
- name: Run tests
21+
run: python -m pytest -q samples/book-app-project/tests
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v2
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v2
26+
- name: Build Docker preview image
27+
uses: docker/build-push-action@v4
28+
with:
29+
context: samples/book-app-project
30+
file: samples/book-app-project/Dockerfile
31+
load: true
32+
push: false
33+
tags: bookkeeper-app:pr-${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)