rspec/.github/workflows/add_language.yml
Mate Molnar 7d64c96a75 Revert "BUILD-4733: Use COVERAGE_GITHUB_TOKEN from the vault instead of the default GITHUB_TOKEN"
This reverts commit 9a14e956754adfffdfb53bd22d4a230cb97acaae.
2024-07-17 10:38:43 +02:00

43 lines
1.1 KiB
YAML

name: Add language to a rule
# Workflow runs when manually triggered using the UI or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
rule:
description: 'ID of an existing rule (e.g., S1234).'
required: true
language:
description: 'Language to be added to the rule, (e.g., cfamily)'
required: true
jobs:
add_language_to_rule:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
ref: master
path: 'rspec'
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: 'Install Pipenv'
run: |
pip install pipenv
- name: 'Install rspec-tools'
working-directory: 'rspec/rspec-tools'
run: pipenv install
- name: 'Add Language'
working-directory: 'rspec/rspec-tools'
run: pipenv run rspec-tools add-lang-to-rule --user ${{ github.actor }} --language "${{ github.event.inputs.language }}" --rule "${{ github.event.inputs.rule }}"