Skip to content

Set a rule to approved #4

Set a rule to approved

Set a rule to approved #4

Workflow file for this run

# Sets a rule to "approved" in the wcag-act-rules repository in a given branch.
name: Set a rule to approved
on:
workflow_dispatch:
inputs:
ruleId:
description: 'Rule ID'
required: true
branch:
description: 'Target branch name (new or existing)'
required: true
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check user permission
uses: 74th/workflow-permission-action@1.0.0
with:
listfile: .github/workflows/chair-accounts.md
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: npm
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: git config --global url."https://github.com/".insteadOf ssh://git@github.com/
- name: Install dependencies
run: npm ci
- name: Configure git
run: |
git config --global url."https://${{ secrets.WAI_GIT_NAME }}:${{ secrets.WAI_GIT_ACCESS_TOKEN }}@github.com".insteadOf "https://github.com"
git config --global user.name "${{ secrets.WAI_GIT_NAME }}"
git config --global user.email "${{ secrets.WAI_GIT_EMAIL }}"
- name: Set rule to approved
run: npx zx .github/scripts/approve-rule.mjs --ruleId "${{ github.event.inputs.ruleId }}" --branch "${{ github.event.inputs.branch }}"