Merge pull request #35 from cbdq-io/bugfix/post-17-20240920T06Z #108
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |