AddOssIndexExclusion #13
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: AddOssIndexExclusion | |
on: | |
workflow_dispatch: | |
inputs: | |
exclusion: | |
description: 'Vulnerability to exclude' | |
required: true | |
type: string | |
permissions: read-all | |
jobs: | |
build: | |
name: Add OSS Index Exclusion action | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PUBLISH_KEY }} | |
- name: Add exclusion | |
run: | | |
echo "${{ github.event.inputs.exclusion }}" >> config/ossindex/exclusions.txt | |
- name: Create git branch | |
run: | | |
git config --global user.name 'Esta Nagy' | |
git config --global user.email '[email protected]' | |
git checkout -b feature/exclude-vulnerability-run-${{ github.run_number }} | |
git add config/ossindex/exclusions.txt | |
git commit -asm "Excluding vulnerability ${{ github.event.inputs.exclusion }} {patch}" | |
git push -f --set-upstream origin feature/exclude-vulnerability-run-${{ github.run_number }} | |
- name: Create PR | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
with: | |
github-token: ${{ secrets.PUBLISH_KEY }} | |
script: | | |
github.rest.pulls.create({ | |
owner: "${{ github.repository_owner }}", | |
repo: "lowkey-vault", | |
head: "feature/exclude-vulnerability-run-${{ github.run_number }}", | |
base: "main", | |
title: "Excluding vulnerability ${{ github.event.inputs.exclusion }} {patch}" | |
}); |