AddOssIndexExclusion #10
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: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PUBLISH_KEY }} | |
- name: "Add exclusion" | |
run: | | |
echo "${{ github.event.inputs.exclusion }}" >> config/ossindex/exclusions.txt | |
- name: "git branch" | |
run: | | |
git config --global user.name 'Esta Nagy' | |
git config --global user.email 'nagyesta@gmail.com' | |
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 }} | |
- 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}" | |
}); |