generated from austenstone/action-typescript
-
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (53 loc) · 1.46 KB
/
usage-enterprise.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Run
permissions: {}
on:
push:
pull_request:
workflow_dispatch:
jobs:
dump_contexts_to_log:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
id: github_context_step
run: echo '${{ toJSON(github) }}'
- name: Dump job context
run: echo '${{ toJSON(job) }}'
- name: Dump steps context
run: echo '${{ toJSON(steps) }}'
- name: Dump runner context
run: echo '${{ toJSON(runner) }}'
- name: Dump strategy context
run: echo '${{ toJSON(strategy) }}'
- name: Dump matrix context
run: echo '${{ toJSON(matrix) }}'
seats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
id: seats
with:
enterprise: octodemo
github-token: ${{secrets.TOKEN}}
outputs:
percentage: ${{steps.seats.outputs.percentage}}
remaining: ${{steps.seats.outputs.remaining}}
print:
needs: [seats]
runs-on: ubuntu-latest
steps:
- run: echo "${{needs.seats.outputs.percentage}}% of seats used."
- run: echo "${{needs.seats.outputs.remaining}} seats remaining"
more-than-50:
needs: [seats]
if: needs.seats.outputs.percentage > 50
runs-on: ubuntu-latest
steps:
- run: echo More than 50% of seats used.
less-than-50:
needs: [seats]
if: needs.seats.outputs.percentage < 50
runs-on: ubuntu-latest
steps:
- run: echo Less than 50% of seats used.