mirror of
https://github.com/ipfs/awesome-ipfs.git
synced 2024-12-19 12:44:35 -05:00
6d5eef146a
* chore: ignore files created by awesome_bot * feat: auto-update README.md when PRs are created * feat: use danger to post awesome_bot results on PRs * chore: wut * Update pull_requests.yml * chore: fake-test * adjust branch used by github-push-action * chore: ensure checkout uses the branch * chore: update README.md * chore: modify dangerfile and workflow ordering * remove fake addition to videos.yaml * chore: update README.md * chore: rename pull_requests.yml * temp: always display awesomeBot results * Revert "temp: always display awesomeBot results" This reverts commitacaef1f4f2
. * chore(deps): install danger as devDep * feat: cache node_modules and readme * Update pull_requests.yml * chore: remove ad-m/github-push-action see https://github.com/ad-m/github-push-action/issues/104 * tmp: PR-demo * Rebuild * Revert "tmp: PR-demo" This reverts commit8bed1326f0
. * Rebuild * fix: no need to push readme update * fix: no need to push readme update readme is updated during 'Rebuild' commit from data.yml * chore: run danger via npm script instead of npx * feat: remove replace circleci cron with github action this github action should open a PR removing broken links automatically Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com>
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
|
|
name: Pull request workflow
|
|
|
|
on:
|
|
pull_request:
|
|
types: [ opened, synchronize, reopened ]
|
|
branches: [ master, main ]
|
|
|
|
jobs:
|
|
# Run linting and tests
|
|
build-and-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 13
|
|
- uses: ipfs/aegir/actions/cache-node-modules@master
|
|
with:
|
|
directories: |
|
|
README.md
|
|
build: |
|
|
npm run build:readme
|
|
cache_name: readme
|
|
# aegir/actions/cache-node-modules runs build. We don't need to run it again.
|
|
- run: npm run lint
|
|
|
|
run-danger:
|
|
runs-on: ubuntu-latest
|
|
needs: build-and-lint
|
|
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 13
|
|
- name: Set up Ruby 3.1.2
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: 3.1.2
|
|
- uses: ipfs/aegir/actions/cache-node-modules@master
|
|
with:
|
|
directories: |
|
|
README.md
|
|
build: |
|
|
npm run build:readme
|
|
cache_name: readme
|
|
- name: Install and run awesome_bot
|
|
# It's okay for awesome_bot to fail. Danger will post a comment on the PR if it fails.
|
|
run: |
|
|
gem install awesome_bot
|
|
awesome_bot --allow 429 --allow-redirect --allow-dupe --allow-ssl -w ipfs.io README.md || echo
|
|
- name: Run danger
|
|
run: npm run ci:danger
|
|
env:
|
|
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
|