mode: commit
Commit the build output
Builds, then commits the build output to the checked out branch. The default mode, and the original behavior of the action.
A GitHub Action that runs your project's build on a push and commits the build output for you, so nobody commits dist/ by hand. Your build runs without the write token.
uses: miguelcolmenares/npm-auto-build@v301 · Why
mode: commit
Builds, then commits the build output to the checked out branch. The default mode, and the original behavior of the action.
mode: check
Builds, then fails when the committed build output is stale. Pushes nothing and reads no token, so it also works for pull requests from forks.
mode: pr
Builds, then commits the output to a branch of its own and keeps one pull request up to date, for a branch that does not accept direct pushes.
mode: build
Builds and checks that the output exists. Pushes nothing, needs no write permission and reads no token.
02 · Docs
The four modes, the reference, recipes, the changes from v2 and the security documents.
The smallest working workflow for mode: commit, what it needs, and what to expect in the first run.
Builds, then commits the build output to the checked out branch and pushes it. This is the default mode and the original behavior of the action.
Builds, then fails when the committed build output is stale. It pushes nothing.
Builds, then commits the output to a branch of its own and keeps one pull request up to date.
Builds and checks that the output exists. It pushes nothing.
Every input and output of the action, as action.yml declares them. This page is generated from that file, so it cannot drift from it. The README and the other pages say when to use each one.
03 · Examples
The workflow files of the examples directory.