forked from bcgov/mobile-attestation-vc-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.13 KB
/
main.yaml
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: Test & Build
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "src/**"
- "fixtures/**"
- "requirements.txt"
# defaults:
# run:
# working-directory: ./web
env:
REGISTRY: ghcr.io
jobs:
quality:
runs-on: ubuntu-latest
permissions:
packages: read
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
# - name: Run tests
# run: |
# pip install -r requirements.txt
# pytest
build:
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [quality]
steps:
- uses: actions/checkout@v4
- name: Build Docker image
uses: ./.github/actions/docker-build
with:
registry: ${{ env.REGISTRY }}
image_name: "${{ github.repository }}/controller"
context: ./
dockerfile: "Dockerfile"
docker_user: ${{ github.actor }}
docker_password: ${{ secrets.GITHUB_TOKEN }}