Skip to content

.github/workflows/test.yml #58

.github/workflows/test.yml

.github/workflows/test.yml #58

Workflow file for this run

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@main
- 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