Skip to content

Commit

Permalink
Merge pull request #140 from tkt-actions/issue-138/chore/auto-commit
Browse files Browse the repository at this point in the history
fix: build and push if a pr author is Dependabot
  • Loading branch information
tktcorporation authored Jun 15, 2022
2 parents e7d45c9 + 591ae06 commit 1438c8a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
name: Test, Build and Push
name: Build and Push
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: npm install, build, lint and test
run: |
npm install
npm run check
build-and-push:
needs: test
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
Expand Down Expand Up @@ -55,7 +37,7 @@ jobs:

- name: Comment on PullRequest
uses: thollander/actions-comment-pull-request@v1
if: ${{ steps.diff.outputs.diff && github.event_name == 'pull_request' }}
if: ${{ steps.diff.outputs.diff }}
with:
message: |
When the build result on the PR was checked, the following files were changed:
Expand All @@ -64,7 +46,7 @@ jobs:


- name: Commit & Push
if: ${{ steps.diff.outputs.diff && github.ref == 'refs/heads/master' }}
if: ${{ steps.diff.outputs.diff && github.pull_request.author != 'dependabot' }}
run: |
set -x
git config user.name github-actions[bot]
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test
on:
push:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: npm install, build, lint and test
run: |
npm install
npm run check

0 comments on commit 1438c8a

Please sign in to comment.