-
Notifications
You must be signed in to change notification settings - Fork 22
58 lines (52 loc) · 1.66 KB
/
test.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
56
57
58
on:
workflow_dispatch:
permissions:
contents: read
issues: read
pull-requests: read
jobs:
job1:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest # eventually will pick up the next version and test it
- ubuntu-24.04 # beta
- ubuntu-22.04 # ubuntu-latest
- ubuntu-20.04
- macos-latest # eventually will pick up the next version and test it
- macos-14 # macos-latest
- macos-13
- macos-12
#- windows-2022 # windows-latest
#- windows-2019
runs-on: ${{ matrix.os }}
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@mitm
- uses: actions/checkout@v4
# test github-script CA
- name: github-script
uses: actions/github-script@v7
with:
script: |
const { data } = await github.rest.issues.listLabelsOnIssue({
issue_number: 2,
owner: context.repo.owner,
repo: context.repo.repo,
});
# test gh CA
- name: gh api
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}/issues/1/labels
# test curl CA
- name: curl
run: |
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://Api.github.com/repos/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}/labels