-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-ci.yml
More file actions
53 lines (45 loc) · 1.3 KB
/
docker-ci.yml
File metadata and controls
53 lines (45 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Docker CI
on:
push:
branches:
- '**'
workflow_dispatch:
jobs:
build:
uses: BerkeleyLibrary/.github/.github/workflows/docker-build.yml@main
with:
image: ghcr.io/${{ github.repository }}
secrets: inherit
# Customize this job as needed
test:
needs: build
runs-on: ubuntu-latest
env:
COMPOSE_FILE: compose.yml:compose.ci.yml
DOCKER_APP_IMAGE: ${{ needs.build.outputs.image }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Compose
uses: docker/setup-compose-action@main
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup the stack
run: |
docker compose pull --quiet
docker compose up --wait
- name: Run the tests
run: |
docker compose exec app test
push:
needs: [build, test]
uses: BerkeleyLibrary/.github/.github/workflows/docker-push.yml@main
with:
image: ghcr.io/${{ github.repository }}
build-image-arm64: ${{ needs.build.outputs.image-arm64 }}
build-image-x64: ${{ needs.build.outputs.image-x64 }}
secrets: inherit