Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Nov 7, 2021
1 parent 8d91719 commit 2033609
Showing 1 changed file with 2 additions and 51 deletions.
53 changes: 2 additions & 51 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ on:
- main

jobs:
test-local:
name: Test auto-doc local
test:
name: Test auto-doc
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
Expand Down Expand Up @@ -61,51 +60,3 @@ jobs:
with:
github_token: ${{ secrets.PAT_TOKEN }}
branch: ${{ github.head_ref }}

test:
name: Test auto-doc
if: github.event_name == 'push'
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token

- name: Run auto-doc using the current working directory
uses: ./

- name: Run auto-doc using the test directory
uses: ./
with:
action: "test/action.yml"
output: "test/README.md"

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v8.6
id: verify-changed-files
with:
files: |
README.md
- name: README.md changed
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
echo "README.md has uncommited changes"
exit 1
- name: Create Pull Request
if: failure()
uses: peter-evans/create-pull-request@v3
with:
base: "main"
title: "auto-doc: Updated README.md"
branch: "chore/auto-doc-update-readme"
commit-message: "auto-doc: Updated README.md"
body: "auto-doc: Updated README.md"
token: ${{ secrets.PAT_TOKEN }}

0 comments on commit 2033609

Please sign in to comment.