Not working on GitHub Actions?
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What is the current behavior?
When running npx bundlesize
in a GitHub Action, I get this warning:
WARN github token not found
You are missing out on some cool features. Read more here: https://github.com/siddharthkp/bundlesize#2-build-status
If the current behavior is a bug, please provide the steps to reproduce.
See output log at See https://github.com/octokit/rest.js/runs/230268601#step:6:6
Configuration:
I first had BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
but then changed it to BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE_GITHUB_TOKEN }}
with the token provided via the OAuth app.
What is the expected behavior?
It should just work ™️
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information.
- node version: 12.10.0
- npm version: version distributed with Node 12.10.0
- Operating system: Ubuntu latest
- bundlesize version: latest, run via
npx
- CI you are using: GitHub Actions
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:14 (5 by maintainers)
Top GitHub Comments
on: push
will not work for pull requests coming from forksBasically you have to make it work without requiring a GitHub token, as repository secrets are not passed to pull requests from forks
Not sure why, and I think this is still a bug, but I think the simplest resolution here is to use
on: push
instead ofon: pull_request
– it will still show up as a status check on PRs.Broken
pull_request
: https://github.com/octokit/rest.js/actions/runs/12676607/workflow Workingpush
: https://github.com/redux-saga/redux-saga/pull/1952/filesI did some testing with GitHub Actions, and changing the trigger event was the exact place where it broke in many specific tests.