-
Notifications
You must be signed in to change notification settings - Fork 45
43 lines (36 loc) · 1.21 KB
/
test_organization_installed.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
# Tests this action success by the application already being installed on an organization
name: Test Success - organization - installed
on:
push:
workflow_dispatch:
inputs:
branch:
description: The name of the branch to checkout for the action
required: true
default: main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout specified branch
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Checkout
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v4
- name: Use action
id: use_action
uses: ./
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
organization: octodemo
- name: Use token to read details
uses: actions/github-script@v7
with:
github-token: ${{ steps.use_action.outputs.token }}
script: |
const repo = await github.rest.repos.get({owner: 'octodemo', repo: 'bootstrap'});
console.log(JSON.stringify(repo, null, 2));