You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+32-20
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,29 @@
1
-
# GitHub Action: setup-nomad-pack
1
+
# GitHub Action: `setup-nomad-pack`
2
2
3
-
The `hashicorp/setup-nomad-pack` Action sets up the `nomad-pack` CLI in your GitHub Actions workflow by adding the binary to `PATH`.
3
+
The `hashicorp/setup-nomad-pack` Action sets up the [Nomad Pack](https://developer.hashicorp.com/nomad/tutorials/nomad-pack/nomad-pack-intro) CLI in your GitHub Actions workflow by adding the `nomad-pack` binary to `PATH`.
This GitHub Actions supports all commands that are available in the `nomad-pack` CLI.
17
23
18
24
The `run`, `destroy`, `info`, and `status` commands require access to a Nomad cluster, as defined through the environment variable `NOMAD_ADDR`.
19
25
20
-
Other [environment variables](https://www.nomadproject.io/docs/commands#environment-variables) (such as `NOMAD_TOKEN`) may be set as normal and will be picked up accordingly.
26
+
Other [environment variables](https://developer.hashicorp.com/nomad/docs/commands#environment-variables) (such as `NOMAD_TOKEN`) may be set as normal and will be picked up accordingly.
21
27
22
28
## Usage
23
29
@@ -26,7 +32,7 @@ Other [environment variables](https://www.nomadproject.io/docs/commands#environm
26
32
- Set the `NOMAD_ADDR` to the IP-address or hostname of a Nomad cluster that is routable for GitHub Actions Runners.
27
33
- Set the `NOMAD_TOKEN` to a token with appropriate permissions to carry out Pack-specific operations on a Nomad cluster.
28
34
29
-
Optionally, set any and all [environment variables](https://www.nomadproject.io/docs/commands#environment-variables) as required for your Nomad cluster.
35
+
Optionally, set any and all [environment variables](https://developer.hashicorp.com/nomad/docs/commands#environment-variables) as required for your Nomad cluster.
30
36
31
37
> **Warning**
32
38
> Running services such as Nomad on a publicly accessible port without authentication is a decidedly bad idea.
- name: Run `nomad-pack info` for `simple_service`
70
+
- name: Run `nomad-pack info` for `./test`
63
71
id: info
64
-
run: "nomad-pack info ./packs/simple_service"
72
+
run: "nomad-pack render ./test"
65
73
66
-
- name: Run `nomad-pack run` for `simple_service`
74
+
- name: Run `nomad-pack run` for `./test`
67
75
id: run
68
-
run: "nomad-pack run ./packs/simple_service"
76
+
run: "nomad-pack run ./test"
69
77
env:
70
78
NOMAD_ADDR: "${{ secrets.NOMAD_ADDR }}"
71
79
NOMAD_TOKEN: "${{ secrets.NOMAD_TOKEN }}"
72
80
continue-on-error: true
81
+
82
+
- name: Run `nomad-pack version`
83
+
id: version
84
+
run: "nomad-pack version"
73
85
```
74
86
75
87
In the above example, the following definitions have been set.
76
88
77
89
- 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).
78
-
- The origin of this GitHub Action has been set as `hashicorp/setup-nomad-pack@0.9.2`. For newer versions, see the [Releases](https://github.com/hashicorp/setup-nomad-pack/releases).
79
-
- The version of `nomad-pack` to set up has been set as `0.0.1-techpreview2`. For a complete list, see [releases.hashicorp.com](https://releases.hashicorp.com/nomad-pack/).
80
-
- The pack to deploy has been set as `./packs/simple_service`
90
+
- The origin of this GitHub Action has been set as `hashicorp/setup-nomad-pack@1.0.0`. For newer versions, see the [Releases](https://github.com/hashicorp/setup-nomad-pack/releases).
91
+
- The version of `nomad-pack` to set up has been set as `0.0.1-techpreview.3`. For a complete list, see [releases.hashicorp.com](https://releases.hashicorp.com/nomad-pack/).
92
+
- The pack to interact with has been set to `./test`
81
93
82
94
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.
0 commit comments