-
Notifications
You must be signed in to change notification settings - Fork 40
41 lines (38 loc) · 1.15 KB
/
test-github-app.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
name: Test Github App
on:
workflow_dispatch:
jobs:
auto_publish_job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
persist-credentials : false
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Use the token
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
gh api octocat
- name: Add test file
run: |
touch test.txt
- name: Commit files
run: |
git add .
git config --local user.email ${{ secrets.APP_ID }}+polusai-auth-helper[bot]@users.noreply.github.com
git config --local user.name "polusai-auth-helper[bot]"
git commit -a -m "Adding test file"
- name: Push changes
uses: ad-m/github-push-action@master
with:
force: true
github_token: ${{ steps.generate_token.outputs.token }}