-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (57 loc) · 2.08 KB
/
test-action.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
59
60
61
62
63
64
65
66
67
68
69
name: Test Action
on:
pull_request:
push:
branches:
- master
tags:
- v0
env:
# renovate: datasource=github-releases depName=nabeken/go-github-apps
GO_GITHUB_APPS_VERSION: '0.1.10'
jobs:
test_action_with_local:
name: Run the action with local version
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Get GITHUB_TOKEN for Github Apps
uses: ./
id: go-github-apps
with:
installation_id: ${{ secrets.installation_id }}
app_id: ${{ secrets.app_id }}
private_key: ${{ secrets.private_key }}
- name: Test Github API call
run: |
curl --fail -H 'Authorization: token ${{ steps.go-github-apps.outputs.app_github_token }}' https://api.github.com/
test_action_with_version:
name: Run the action with the version
runs-on: ubuntu-latest
steps:
- name: Get GITHUB_TOKEN for Github Apps
uses: nabeken/go-github-apps@fc859a239d984b2704ccbe50f0ea4d9034e7cdaa # v0
id: go-github-apps
with:
installation_id: ${{ secrets.installation_id }}
app_id: ${{ secrets.app_id }}
private_key: ${{ secrets.private_key }}
version: '${{ env.GO_GITHUB_APPS_VERSION }}'
- name: Test Github API call
run: |
curl --fail -H 'Authorization: token ${{ steps.go-github-apps.outputs.app_github_token }}' https://api.github.com/
test_action_with_default:
name: Run the action with the default version
runs-on: ubuntu-latest
steps:
- name: Get GITHUB_TOKEN for Github Apps
uses: nabeken/go-github-apps@fc859a239d984b2704ccbe50f0ea4d9034e7cdaa # v0
id: go-github-apps
with:
installation_id: ${{ secrets.installation_id }}
app_id: ${{ secrets.app_id }}
private_key: ${{ secrets.private_key }}
- name: Test Github API call
run: |
curl --fail -H 'Authorization: token ${{ steps.go-github-apps.outputs.app_github_token }}' https://api.github.com/