Skip to content

Commit

Permalink
Prep for release (#3)
Browse files Browse the repository at this point in the history
* enable Code Scanning

* updates to Nomad 1.5.0 🎉

* changes lockfile to version 2 to allow for Snyk inspections
  • Loading branch information
ksatirli authored Mar 12, 2023
1 parent 6428c5f commit da932bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/actions-self-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ name: "GitHub Action: Self-Test"
on:
push:

env:
PRODUCT_VERSION: "1.5.0"

jobs:
setup-nomad:
runs-on: ubuntu-latest
name: Test `setup-nomad`
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -15,7 +18,7 @@ jobs:
uses: "./"
id: setup
with:
version: "1.5.0"
version: ${{ env.PRODUCT_VERSION }}

- name: Print `$PATH` for `nomad`
run: which nomad
Expand All @@ -24,10 +27,10 @@ jobs:
run: nomad version

- name: Validate `nomad` version is accurate
run: "nomad version | grep --silent 'Nomad v1.5.0'"
run: "nomad version | grep --silent 'Nomad v${{ env.PRODUCT_VERSION }}'"

- name: Run `nomad fmt`
run: nomad fmt "${{ github.action_path }}./test/example.nomad.hcl"
run: nomad fmt -check "${{ github.action_path }}./test/example.nomad.hcl"

- name: Setup `nomad` with an invalid version (using local GitHub Action)
uses: "./"
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

The `hashicorp/setup-nomad` Action sets up the [Nomad](https://www.nomadproject.io) CLI in your GitHub Actions workflow by adding the `nomad` binary to `PATH`.

[![GitHub Action: Self-Test](https://github.com/hashicorp/setup-nomad/actions/workflows/actions-self-test.yml/badge.svg?branch=main)](https://github.com/hashicorp/setup-nomad/actions/workflows/actions-self-test.yml)

## Table of Contents

<!-- TOC -->
Expand Down Expand Up @@ -31,6 +33,9 @@ name: nomad
on:
- push

env:
PRODUCT_VERSION: "1.5.0"

jobs:
nomad:
runs-on: ubuntu-latest
Expand All @@ -40,10 +45,10 @@ jobs:
uses: actions/checkout@v3

- name: Setup `nomad`
uses: hashicorp/setup-nomad@v1
uses: hashicorp/setup-nomad@v1.0.0
id: setup
with:
version: "1.5.0" # or `latest`
version: ${{ env.PRODUCT_VERSION }}

- name: Run `nomad version`
id: version
Expand All @@ -53,7 +58,7 @@ jobs:
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](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
- The origin of this GitHub Action has been set as `hashicorp/setup-nomad@v1`. For newer versions, see the [Releases](https://github.com/hashicorp/setup-nomad/releases).
- The origin of this GitHub Action has been set as `hashicorp/setup-nomad@v1.0.0`. For newer versions, see the [Releases](https://github.com/hashicorp/setup-nomad/releases).
- The version of `nomad` to set up has been set as `1.5.0`. For a complete list, see [releases.hashicorp.com](https://releases.hashicorp.com/nomad/).

These definitions may require updating to suit your deployment, such as specifying [self-hosted](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-self-hosted-runners) runners.
Expand Down

0 comments on commit da932bd

Please sign in to comment.