Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/actions/setup_environment/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,21 @@ inputs:
description: "Trivy enabled"
required: true
default: "false"
zizmor-version:
description: "Zizmor version"
required: true
default: "1.0.1"
zizmor-enabled:
description: "Zizmor enabled"
required: true
default: "false"

runs:
using: "composite"
steps:
- name: Setup Task
if: ${{ inputs.task-enabled == 'true' }}
uses: arduino/setup-task@v1
uses: arduino/setup-task@v2.0.0
with:
version: ${{ inputs.task-version }}

Expand All @@ -61,3 +69,12 @@ runs:
uses: aquasecurity/[email protected]
with:
version: ${{ inputs.trivy-version }}

- name: Setup Zizmor
if: ${{ inputs.zizmor-enabled == 'true' }}
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install "zizmor==${ZIZMOR_VERSION}"
env:
ZIZMOR_VERSION: ${{ inputs.zizmor-version }}
5 changes: 5 additions & 0 deletions .github/workflows/check-pr-title.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- synchronize
- edited

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
check-pr-title:
runs-on: ubuntu-latest
Expand All @@ -16,6 +20,7 @@ jobs:
- name: Checkout config file
uses: actions/checkout@v4
with:
persist-credentials: false
sparse-checkout: |
commitlint.config.js
sparse-checkout-cone-mode: false
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- reopened
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
check-pr:
runs-on: ubuntu-latest
Expand All @@ -17,12 +21,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Environment
uses: ./.github/actions/setup_environment
with:
python-enabled: true
poetry-enabled: true
zizmor-enabled: true

- name: Install Dependencies
run: |
Expand All @@ -31,6 +38,8 @@ jobs:
- name: Lint PR
run: |
task lint
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required for Zizmor

- name: Test backend in container
working-directory: backend
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/github-watcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- name: Checkout config file
uses: actions/checkout@v4
with:
persist-credentials: false
sparse-checkout: |
.github/github-watcher-config.yaml
sparse-checkout-cone-mode: false
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release-pr-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- cron: 0 0 * * 0 # Every Sunday at 00:00 UTC
workflow_dispatch:

concurrency:
group: $${{ github.workflow }}
cancel-in-progress: false

jobs:
release-pr-cleanup:
runs-on: ubuntu-22.04
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- reopened
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
release-pr:
runs-on: ubuntu-latest
Expand All @@ -19,6 +23,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Environment
uses: ./.github/actions/setup_environment
Expand All @@ -28,9 +34,11 @@ jobs:
- name: Get Image Data
id: get-image-data
run: |
echo "registry=ghcr.io/${{ github.repository_owner }}" >> $GITHUB_OUTPUT
echo "name=${{ github.event.repository.name }}-beta" >> $GITHUB_OUTPUT
echo "tag=${{ github.event.number }}-${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
{
echo "registry=ghcr.io"
echo "name=${{ github.repository }}-beta"
echo "tag=${{ github.event.number }}-${{ github.run_id }}-${{ github.run_attempt }}"
} >> "$GITHUB_OUTPUT"

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- cron: 0 0 * * 0
workflow_dispatch:

concurrency:
group: $${{ github.workflow }}
cancel-in-progress: false

jobs:
scan:
runs-on: ubuntu-latest
Expand All @@ -17,6 +21,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Environment
uses: ./.github/actions/setup_environment
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
types:
- published

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-20.04
Expand All @@ -15,7 +19,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Environment
uses: ./.github/actions/setup_environment
Expand Down
Loading
Loading