Added a condition for using ARC runners to the linux-jammy-py3.8-gcc1… #1
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: Check whether the workflow owner can use ARC runners | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
user_name: | ||
required: true | ||
type: string | ||
description: The name of the workflow owner. | ||
jobs: | ||
check-user: | ||
runs-on: linux.4xlarge | ||
outputs: | ||
use-rg: ${{ steps.set-condition.outputs.use-rg }} | ||
step: | ||
- name: Download the latest arc_users.yml | ||
run: | | ||
wget https://raw.githubusercontent.com/pytorch/test-infra/44e046ac67dc0ff7be98025d39984ad2e4def044/.github/arc_users.yaml | ||
- name: Check if user is in arc_users.yml | ||
id: set-condition | ||
run: | | ||
if grep -q "${{ inputs.user_name }}" arc_users.yaml; then | ||
echo "::set-output name=use-rg::true" | ||
else | ||
echo "::set-output name=use-rg::false" | ||
fi |