This repository was archived by the owner on Nov 25, 2025. It is now read-only.
forked from izhangzhihao/delete-comment
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.41 KB
/
test.yml
File metadata and controls
47 lines (45 loc) · 1.41 KB
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
name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
pull_request_target:
push:
branches:
- master
- 'releases/*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
npm install
- name: Build the action.
run: |
npm run all
- name: Commit the dist directory.
if: ${{ github.event_name == 'push' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: "dist/*"
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_message: "[BOT] Update dist folder."
add_options: '-u'
auto_merge:
needs: [ build ]
runs-on: ubuntu-latest
if: |
github.event_name == 'pull_request' &&
(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]')
steps:
- name: "@dependabot merge"
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.createComment({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
issue_number: context.payload.pull_request.number,
body: '@dependabot merge'
})