mirror of
https://github.com/ipfs/awesome-ipfs.git
synced 2024-11-27 11:37:23 -05:00
fix: run-danger workflow
related to https://github.com/danger/danger/issues/1103
This commit is contained in:
parent
da14bf07bf
commit
5062b6d512
1 changed files with 15 additions and 7 deletions
22
.github/workflows/pull_requests.yml
vendored
22
.github/workflows/pull_requests.yml
vendored
|
@ -32,8 +32,6 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
|
@ -50,12 +48,22 @@ jobs:
|
|||
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.
|
||||
# It's okay for awesome_bot to fail (for maintainers only). Danger will post a comment on the PR (for maintainers only) 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
|
||||
# Only fail the pull request if $DANGER_GITHUB_API_TOKEN is empty
|
||||
awesome_bot --allow 429 --allow-redirect --allow-dupe --allow-ssl -w ipfs.io README.md || [ -n $DANGER_GITHUB_API_TOKEN ]
|
||||
env:
|
||||
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
|
||||
- name: Run danger
|
||||
if: always()
|
||||
# see https://github.com/danger/danger/issues/1103
|
||||
# see https://github.com/danger/danger/blob/master/.github/workflows/CI.yml#L38-L41
|
||||
run: |
|
||||
TOKEN='7469b4e94ce21b43e3ab7a'
|
||||
TOKEN+='79960c12a1e067f2ec'
|
||||
SECRET_TOKEN="${DANGER_GITHUB_API_TOKEN:-$GITHUB_TOKEN}"
|
||||
DANGER_GITHUB_API_TOKEN=${SECRET_TOKEN:-$TOKEN} RUNNING_IN_ACTIONS=true npm run ci:danger || echo "Skipping Danger for External Contributor"
|
||||
env:
|
||||
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
Loading…
Reference in a new issue