generated from austenstone/action-typescript
-
-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (33 loc) · 988 Bytes
/
usage-notify.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
name: Notify Inactive Copilot Licenses
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
copilot:
name: Copilot Seats
runs-on: ubuntu-latest
outputs:
inactive-seats: ${{ steps.copilot.outputs.inactive-seats }}
steps:
- uses: actions/checkout@v4
- uses: ./
with:
github-token: ${{ secrets.TOKEN }}
organization: 'octodemo'
inactive-days: 30
csv: true
notify-inactive:
name: Notify Inactive Users
runs-on: ubuntu-latest
needs: copilot
strategy:
matrix:
user: ${{ fromJson(needs.copilot.outputs.inactive-seats) }}
steps:
- uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: 'CHANNEL_ID,ANOTHER_CHANNEL_ID'
slack-message: 'Hey <@${{ matrix.user }}>, you have not used Copilot for 30 days. Please contact your manager to free up your seat.'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}