adding additional API validity check v3 #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Tests and Update README | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
run-tests-and-update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- uses: actions/checkout@v2 | |
# Setup Node.js | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
# Install dependencies | |
- name: Install dependencies | |
run: npm install | |
# Run tests and generate test results | |
- name: Run tests and generate test results | |
run: npm run test:json | |
# Update README.md | |
- name: Update README.md | |
run: npm run updateReadme | |
# Commit and push if README.md changed | |
- name: Commit and push if README.md changed | |
env: | |
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
run: | | |
git config --global user.name 'Anthony Izzo' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://amizzo87:${PERSONAL_ACCESS_TOKEN}@github.com/amizzo87/chatgpt-plugins.git | |
git add README.md | |
git commit -m "Update README.md with latest test results" -a || echo "No changes to commit" | |
git push |