The hashicorp/setup-sentinel
Action sets up the Sentinel CLI in your GitHub Actions workflow by adding the sentinel
binary to PATH
.
This GitHub Actions supports all commands that are available in the sentinel
CLI.
Create a GitHub Actions Workflow file (e.g.: .github/workflows/sentinel.yml
):
name: sentinel
on:
push:
env:
PRODUCT_VERSION: "0.25.1" # or: "latest"
jobs:
sentinel:
runs-on: ubuntu-latest
name: Run Sentinel
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup `sentinel`
uses: hashicorp/setup-sentinel@main
id: setup
with:
version: ${{ env.PRODUCT_VERSION }}
- name: Run `sentinel test`
id: test
run: "sentinel test"
In the above example, the following definitions have been set.
- The event trigger has been set to
push
. For a complete list, see Events that trigger workflows. - The origin of this GitHub Action has been set as
hashicorp/setup-sentinel@main
. For newer versions, see the Releases. - The version of
sentinel
to set up has been set as0.25.1
. For a complete list, see releases.hashicorp.com.
These definitions may require updating to suit your deployment, such as specifying self-hosted runners.
Additionally, you may configure outputs to consume return values from the Action's operations.
This section contains a list of all inputs that may be set for this Action.
version
- The version ofsentinel
to install. Defaults tolatest
if unset.
Note
To retrieve the latest
version, this GitHub Action polls the HashiCorp Releases API and finds the latest released version of sentinel that isn't marked as a pre-release (is_prerelease
).
This section contains a list of all outputs that can be consumed from this Action.
version
- The version ofsentinel
that was installed.
Licensed under the Apache License, Version 2.0 (the "License").
You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" basis, without WARRANTIES or conditions of any kind, either express or implied.
See the License for the specific language governing permissions and limitations under the License.