forked from icub-tech-iit/outside-collaborators
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.23 KB
/
delete-invitations.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Delete Invitations
on:
workflow_dispatch:
inputs:
repositories:
description: 'A comma-separated list of repos containing the invitations to delete (use the wildcard * for all)'
required: true
default: '*'
only_expired:
type: boolean
description: 'Delete expired invitations only'
required: true
default: true
concurrency:
group: outside_collaborators_delete_invitations
cancel-in-progress: true
jobs:
Check:
name: "Delete"
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo gem install octokit yaml
- name: Set Env Variables
run: |
echo "OUTSIDE_COLLABORATORS_GITHUB_ORG=${{ github.repository_owner }}" >> ${GITHUB_ENV}
echo "OUTSIDE_COLLABORATORS_GITHUB_TOKEN=${{ secrets.OUTSIDE_COLLABORATORS_TOKEN }}" >> ${GITHUB_ENV}
echo "OUTSIDE_COLLABORATORS_REPOS_DELETE_INVITATIONS=${{ inputs.repositories }}" >> ${GITHUB_ENV}
echo "OUTSIDE_COLLABORATORS_ONLY_EXPIRED_INVITATIONS=${{ inputs.only_expired }}" >> ${GITHUB_ENV}
- uses: actions/checkout@main
- name: Run Handler
run: |
cd scripts
./delete-invitations.rb