From 607934bf3ac8ee840a7e90fd7e5ba2ffa7c807c4 Mon Sep 17 00:00:00 2001 From: cn-kali-team Date: Mon, 18 Mar 2024 14:18:26 +0800 Subject: [PATCH] fly:cvssv2 --- .github/workflows/docker-publish.yml | 7 +++++++ .github/workflows/pre-commit.yml | 16 ++++++++++++---- nvd-yew/src/component/cvss_tags.rs | 4 ++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 053a37f..490603c 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -3,6 +3,13 @@ on: push: tags: - "v*" + workflow_call: + inputs: + deploy_to_fly: + description: '[Auto Fly Deploy]' + required: false + type: boolean + default: false workflow_dispatch: inputs: deploy_to_fly: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4ba21a3..744d7fc 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -2,11 +2,19 @@ name: pre-commit on: pull_request: push: - branches: [main] + branches: [ main ] jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.3 + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.3 + deploy: + if: github.repository == 'emo-crab/scap-rs' && github.actor == 'cn-kali-team' && contains(github.event.head_commit.message, 'fly:') + uses: ./.github/workflows/docker-publish.yml + with: + deploy_to_fly: true + needs: + - docker + secrets: inherit diff --git a/nvd-yew/src/component/cvss_tags.rs b/nvd-yew/src/component/cvss_tags.rs index 120b07f..f7657e0 100644 --- a/nvd-yew/src/component/cvss_tags.rs +++ b/nvd-yew/src/component/cvss_tags.rs @@ -244,14 +244,14 @@ impl Component for V2CardTag {