-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 841 Bytes
/
Copy pathci-cd.yaml
File metadata and controls
37 lines (32 loc) · 841 Bytes
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
name: CI/CD Pipeline
on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
pull_request:
branches:
- '**'
workflow_dispatch:
jobs:
lint:
uses: ./.github/workflows/ruff.yaml
test:
needs: lint
uses: ./.github/workflows/pytest.yaml
docker:
needs: test
uses: ./.github/workflows/docker-build-and-scan.yaml
with:
DOCKER_PATH_CONTEXT: .
DOCKER_BUILD_DOCKERFILE: ./Dockerfile
DOCKER_TAGS: ${{ github.repository }}:${{ github.sha }}
DOCKER_LOAD_BOOL: false
DOCKER_PUSH_BOOL: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
secrets: inherit
release:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
needs: [test, docker]
uses: ./.github/workflows/release.yaml
secrets: inherit