new: Run the default branch on a schedule. #2
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@v3 | |
- 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@v2 | |
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 |