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
76 changes: 6 additions & 70 deletions .github/actions/setup_environment/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,15 @@ name: "Setup Environment"
description: "Setting environment for the project"

inputs:
task-version:
description: "Task version"
mise-version:
description: "Mise version, tools are pinned in mise.toml"
required: true
default: "3.33.1"
task-enabled:
description: "Task enabled"
required: true
default: "true"
python-version:
description: "Python version"
required: true
default: "3.12.1"
python-enabled:
description: "Python enabled"
required: true
default: "false"
poetry-version:
description: "Poetry version"
required: true
default: "1.7.1"
poetry-enabled:
description: "Poetry enabled"
required: true
default: "false"
trivy-version:
description: "Trivy version"
required: true
default: "v0.57.1"
trivy-enabled:
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"
default: "2026.10.15"

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

- name: Setup Python
if: ${{ inputs.python-enabled == 'true' }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}

- name: Setup Poetry
if: ${{ inputs.poetry-enabled == 'true' }}
uses: snok/install-poetry@v1
with:
version: ${{ inputs.poetry-version }}

- name: Setup Trivy
if: ${{ inputs.trivy-enabled == 'true' }}
uses: aquasecurity/setup-trivy@v0.2.2
- name: Setup mise
uses: jdx/mise-action@fc42bcc7ddbf51124c30f95a877a0c5168a3bfde # v5.2.1
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 }}
version: ${{ inputs.mise-version }}
7 changes: 5 additions & 2 deletions .github/workflows/check-pr-title.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ jobs:
check-pr-title:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout config file
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: |
commitlint.config.js
sparse-checkout-cone-mode: false

- name: Commitlint PR Title
uses: ovsds/commitlint-pr-title-action@v1
uses: ovsds/commitlint-pr-title-action@a7fcd68b8f503b025ad4ee3ded6b26998cf8c369 # v1.2.0
with:
config_file: ./commitlint.config.js
14 changes: 5 additions & 9 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,27 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

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

- name: Install Dependencies
run: |
task init
mise run init

- name: Lint PR
run: |
task lint
mise run lint
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required for Zizmor

- name: Test backend in container
working-directory: backend
run: |
task test-container
mise run test-container
env:
GITHUB_TOKEN: ${{ secrets.GH_WATCHER_INTEGRATION_TEST_TOKEN }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/github-watcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:

steps:
- name: Checkout config file
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: |
.github/github-watcher-config.yaml
sparse-checkout-cone-mode: false

- name: Run
uses: ovsds/github-watcher-action@v1
uses: ovsds/github-watcher-action@2ac15b13425d491a599d5cf2e9cf108d27658a35 # v1.4.0
with:
config_path: .github/github-watcher-config.yaml
env_variables: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pr-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
packages: write

steps:
- uses: ovsds/package-lifecycle-action@v1
- uses: ovsds/package-lifecycle-action@d9231272af5ca6198f837847c441d1072903b185 # v1.0.2
with:
package-name: ${{ github.event.repository.name }}-beta
expire-period-days: 7
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Environment
uses: ./.github/actions/setup_environment
with:
trivy-enabled: true
uses: $/.github/actions/setup_environment

- name: Get Image Data
id: get-image-data
Expand All @@ -41,37 +39,36 @@ jobs:
} >> "$GITHUB_OUTPUT"

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Configure Docker Builder
run: task configure-builder
run: mise run configure-builder

- name: Build backend images
working-directory: backend
- name: Build image
env:
IMAGE_REGISTRY: ${{ steps.get-image-data.outputs.registry }}
IMAGE_NAME: ${{ steps.get-image-data.outputs.name }}
IMAGE_TAG: ${{ steps.get-image-data.outputs.tag }}
run: |
task ci-image-push
mise run ci-image-push

- name: Scan backend image
- name: Scan image
id: scan
uses: ovsds/run-with-output-action@v1
uses: ovsds/run-with-output-action@9bc0dcb1df5b70d1704c709f9cc0f40d260a5f40 # v1.4.0
continue-on-error: true
with:
run: |
IMAGE_REGISTRY="${{ steps.get-image-data.outputs.registry }}" \
IMAGE_NAME="${{ steps.get-image-data.outputs.name }}" \
IMAGE_TAG="${{ steps.get-image-data.outputs.tag }}" \
task backend:ci-image-scan
mise run ci-image-scan

- name: Report vulnerabilities
uses: ovsds/create-or-update-unique-comment-action@v1
uses: ovsds/create-or-update-unique-comment-action@df30f5f96aa71679deb9eb697c98f39ee9e26651 # v1.1.0
with:
issue-number: ${{ github.event.number }}
body: |
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/release-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,34 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Environment
uses: ./.github/actions/setup_environment
with:
trivy-enabled: true
uses: $/.github/actions/setup_environment

- name: Get latest image tag
id: get_tag
uses: pozetroninc/github-action-get-latest-release@v0.8.0
uses: pozetroninc/github-action-get-latest-release@2a61c339ea7ef0a336d1daa35ef0cb1418e7676c # v0.8.0
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
excludes: prerelease, draft

- name: Scan image for vulnerabilities
id: scan
uses: ovsds/run-with-output-action@v1
uses: ovsds/run-with-output-action@9bc0dcb1df5b70d1704c709f9cc0f40d260a5f40 # v1.4.0
continue-on-error: true
with:
run: |
IMAGE_REGISTRY="ghcr.io/${{ github.repository_owner }}" \
IMAGE_NAME="${{ github.event.repository.name }}" \
IMAGE_TAG="${{ steps.get_tag.outputs.release }}" \
task backend:ci-image-scan
mise run ci-image-scan

- name: Report vulnerabilities
uses: ovsds/create-or-update-unique-issue-action@v1
uses: ovsds/create-or-update-unique-issue-action@8999e391f74f20449dcc70e94aee731a3938d543 # v1.1.0
with:
title: "Security scan issues for ${{ steps.get_tag.outputs.release }}"
body: |
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,27 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Environment
uses: ./.github/actions/setup_environment
uses: $/.github/actions/setup_environment

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Configure Docker Builder
run: task configure-builder
run: mise run configure-builder

- name: Build backend images
working-directory: backend
- name: Build image
env:
IMAGE_TAG: ${{ github.event.release.tag_name }}
IMAGE_NAME: ${{ github.event.repository.name }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
IMAGE_NAME: ${{ github.event.repository.name }}
IMAGE_TAG: ${{ github.event.release.tag_name }}
run: |
task ci-image-push
mise run ci-image-push
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
fund=false
audit=false
save-exact=true
unsafe-perm=true
engine-strict=true
update-notifier=false
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

1 change: 0 additions & 1 deletion .poetry-version

This file was deleted.

1 change: 0 additions & 1 deletion .python-version

This file was deleted.

1 change: 0 additions & 1 deletion .scripts/.python-version

This file was deleted.

4 changes: 2 additions & 2 deletions .scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Support scripts collection
- github-cli
- yacloud-cli

### Taskfile commands
### mise tasks

For all commands see [Taskfile](Taskfile.yaml) or `task --list-all`.
For all commands see [mise.toml](mise.toml) or `mise tasks ls`.
44 changes: 0 additions & 44 deletions .scripts/Taskfile.yaml

This file was deleted.

Loading
Loading