-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (78 loc) · 2.09 KB
/
dagger-docker.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Dagger/Docker Testing Suite
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
image_tag:
description: 'Image tag to use for the Docker image'
required: true
default: 'latest'
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install pre-commit
pre-commit install
- name: Run pre-commit
run: |
pre-commit run --all-files --show-diff-on-failure
integration:
name: Integration Tests
needs: lint
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
if: github.event_name == 'workflow_dispatch'
with:
context: .
file: "Dockerfile"
build-args: |
BASE_IMAGE_TAG=${{ github.event.inputs.image_tag }}
tags: localpavics-sdi:latest
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
- uses: docker/build-push-action@v4
if: github.event_name != 'workflow_dispatch'
with:
context: .
file: "Dockerfile"
tags: localpavics-sdi:latest
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
- name: Dagger testing
run: |
pip install .[dagger]
python ./ci/dagger-pipeline.py