-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (43 loc) · 1.24 KB
/
pipeline.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
54
55
56
---
name: Odoo
on:
push:
branches-ignore:
- 'feature/latest'
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '5 1 * * TUE'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
Odoo:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint
run: make lint
- name: Build
run: make build
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "odoo:latest"
trivy-config: trivy.yaml
- name: Test
run: make test
- name: Log in to the Container Registry
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push latest
if: github.ref == 'refs/heads/develop'
run: make pushLatest
- name: Push Tag
if: github.ref == 'refs/heads/main'
run: make pushTag