diff --git a/.github/workflows/cves-on-demand.yaml b/.github/workflows/cves-on-demand.yaml new file mode 100644 index 0000000000..db6f1e9ca1 --- /dev/null +++ b/.github/workflows/cves-on-demand.yaml @@ -0,0 +1,29 @@ +name: CVEs On Demand + +on: + issues: + types: [created, edited, labeled] + +jobs: + execute-trickest-workflow: + if: ${{ github.event.label.name == 'On-Demand' }} + runs-on: ubuntu-latest + steps: + + - name: Check Out + uses: actions/checkout@main + + - name: Replace Variables + run: | + cat config-template.yaml | sed 's/$CVE/${{ github.event.issue.title }}/g' | sed 's/$ISSUE_ID/${{ github.event.issue.number }}/g' > config.yaml + + - name: Trickest Execute + id: trickest + uses: trickest/action@main + env: + TRICKEST_TOKEN: "${{ secrets.TRICKEST_TOKEN }}" + with: + workflow: "CVE - On Demand" + space: "CVEs" + watch: true + config_path: config.yaml diff --git a/config-template.yaml b/config-template.yaml new file mode 100644 index 0000000000..824002b846 --- /dev/null +++ b/config-template.yaml @@ -0,0 +1,3 @@ +inputs: # List of input values for the particular workflow nodes. + string-to-file-1.string: $CVE + string-to-file-2.string: $ISSUE_ID \ No newline at end of file