-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 2 KB
/
Copy pathbuild.yml
File metadata and controls
71 lines (61 loc) · 2 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build / Test / Push
on:
push:
branches:
- '**'
workflow_call:
workflow_dispatch:
jobs:
docker-build:
uses: BerkeleyLibrary/.github/.github/workflows/docker-build.yml@v2.0.0
with:
image: ghcr.io/${{ github.repository }}
secrets: inherit
test:
runs-on: ubuntu-24.04
needs: docker-build
env:
COMPOSE_FILE: docker-compose.yml:docker-compose.ci.yml
DOCKER_APP_IMAGE: ${{ needs.docker-build.outputs.image }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Docker Compose
uses: docker/setup-compose-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup the stack
run: |
docker compose up --wait
docker compose exec -u root app chown -R bfs:bfs artifacts
- name: Run RSpec
if: ${{ always() }}
run: |
docker compose exec app rspec --format progress --format html --out artifacts/rspec.html
- name: Copy out artifacts
if: ${{ always() }}
run: |
docker compose cp app:/opt/app/artifacts ./
docker compose logs > artifacts/docker-compose-services.log
docker compose config > artifacts/docker-compose.merged.yml
- name: Upload the test report
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: BFS Build Report (${{ github.run_id }}_${{ github.run_attempt }})
path: artifacts/*
if-no-files-found: error
push:
needs:
- docker-build
- test
uses: BerkeleyLibrary/.github/.github/workflows/docker-push.yml@v2.0.0
with:
image: ghcr.io/${{ github.repository }}
build-image-arm64: ${{ needs.docker-build.outputs.image-arm64 }}
build-image-x64: ${{ needs.docker-build.outputs.image-x64 }}
secrets: inherit