Skip to content

Commit 099b75f

Browse files
committed
add build workflow
1 parent 5293ede commit 099b75f

File tree

1 file changed

+6
-41
lines changed

1 file changed

+6
-41
lines changed

.github/workflows/ci.yml .github/workflows/build.yml

+6-41
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,18 @@
1-
name: ci
1+
name: Build
22

33
on:
4-
pull_request:
5-
push:
6-
branches: [main]
4+
workflow_run:
5+
workflows: [Tests]
6+
types:
7+
- completed
78

89
env:
910
REGISTRY: ghcr.io
1011
IMAGE_NAME: ${{ github.repository }}
1112

1213
jobs:
13-
prepare:
14+
build:
1415
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v4
17-
- uses: docker/setup-buildx-action@v3
18-
- name: build ci image
19-
uses: docker/build-push-action@v5
20-
with:
21-
context: .
22-
tags: teufa:ci
23-
target: ci
24-
load: true
25-
cache-from: type=gha
26-
cache-to: type=gha,mode=max
27-
push: false
28-
29-
tests:
30-
runs-on: ubuntu-latest
31-
needs: prepare
32-
container: teufa:ci
33-
services:
34-
postgres:
35-
image: postgres
36-
env:
37-
POSTGRES_PASSWORD: postgres
38-
options: >-
39-
--health-cmd pg_isready
40-
--health-interval 10s
41-
--health-timeout 5s
42-
--health-retries 5
43-
ports:
44-
- 5432:5432
45-
steps:
46-
- run: pytest
47-
48-
build-push:
49-
runs-on: ubuntu-latest
50-
needs: tests
5116
permissions:
5217
contents: read
5318
packages: write

0 commit comments

Comments
 (0)