Collection of reusable github actions
Reports web app build size changes between pull request and main branches.
dir
- path to the build foldersha
- commit sha, uses${{ github.sha }}
as defaultlabel
- custom label to distinguish multiple builds, uses"default"
as default
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn install
- run: yarn build
- uses: superdispatch/actions/build-size/cache@v1
with:
dir: build
dir
- path to the build foldersha
- commit sha, uses${{ github.event.pull_request.base.sha }}
as defaultlabel
- custom label to distinguish multiple builds, uses"default"
as defaultpr
- pull request number, uses${{ github.event.number }}
as defaulttoken
- github token, uses${{ github.token }}
as default
on:
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn install
- run: yarn build
- uses: superdispatch/actions/build-size/report@v1.5.0
with:
dir: build
Deploys build preview to Netlify
dir
- folder to deploypr
- pull request number, uses${{ github.event.number }}
as defaultalias
- alias for deployment, usespreview-${pr}
as defaulttoken
- github token, uses${{ github.token }}
as defaultnetlify-token
- netlify tokennetlify-site-id
- netlify site to deploy to
on:
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn install
- run: yarn build
- uses: superdispatch/actions/deploy-preview@v1.5.0
with:
dir: build
netlify-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
Removes workflow artifacts
token
- github token, uses${{ github.token }}
as defaultpattern
- reg-exp pattern string to match an artifact name, uses".*"
as defaultskip-recent
- keep specified number of artifacts even if they are matching provided pattern
on:
schedule:
- cron: '0 1 * * *'
jobs:
prune-artifacts:
runs-on: ubuntu-latest
steps:
- uses: superdispatch/actions/prune-artifacts@v1.5.0
with:
skip-recent: 5
pattern: '^e2e-'
Updates changed files if changes are detected.
dry-run
- string, dry run commit and push commandscommand
- string, a command that is run for checkingupdate-command
- string, a command that is run if main command failsmessage
- string, commit message when there is changes found. Defaults "chore: Updated snapshots changes."token
- github token, uses${{ github.token }}
as default
name: Tests
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: superdispatch/actions/update-snapshots@v1.5.0
with:
command: yarn test
update-command: yarn test -u
Limit PRs per user see more details