-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Deploy | |
on: | ||
workflow_call: | ||
inputs: | ||
image-ref: | ||
image-digest: | ||
required: true | ||
type: string | ||
environment: | ||
|
@@ -14,7 +14,7 @@ on: | |
type: boolean | ||
workflow_dispatch: | ||
inputs: | ||
image-ref: | ||
image-digest: | ||
required: true | ||
type: string | ||
environment: | ||
|
@@ -40,15 +40,22 @@ jobs: | |
- name: Setup Nomad | ||
uses: lucasmelin/[email protected] | ||
|
||
- name: Set job name | ||
working-directory: ./.nomad/ | ||
run: | | ||
sed -i '/job "apiary" {/c\job "apiary-${{ inputs.environment }}" {' apiary.nomad | ||
cat apiary.nomad | ||
- name: Exchange GitHub JWT for Nomad token | ||
uses: mikenomitch/[email protected] | ||
with: | ||
url: https://nomad.bcdc.robojackets.net | ||
jwtGithubAudience: https://nomad.bcdc.robojackets.net | ||
methodName: GitHub | ||
|
||
- name: Run Nomad | ||
- name: Run Nomad job | ||
env: | ||
NOMAD_ADDR: https://nomad.bcdc.robojackets.net | ||
working-directory: ./.nomad/ | ||
run: | | ||
nomad job status | ||
nomad run -var image=registry.bcdc.robojackets.net/robojackets/apiary@${{ inputs.image-digest }} -var precompressed_assets=${{ inputs.precompressed-assets }} -var-file var-files/${{ inputs.environment }}.hcl apiary.nomad |