Skip to content

Commit

Permalink
Finish test deployment?
Browse files Browse the repository at this point in the history
  • Loading branch information
kberzinch committed Mar 3, 2024
1 parent d21a60a commit 171ca76
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,6 @@ jobs:
id-token: write
contents: read
with:
image-ref: ${{ needs.docker.outputs.image-digest }}
image-digest: ${{ needs.docker.outputs.image-digest }}
environment: test
precompressed-assets: true
15 changes: 11 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy
on:
workflow_call:
inputs:
image-ref:
image-digest:
required: true
type: string
environment:
Expand All @@ -14,7 +14,7 @@ on:
type: boolean
workflow_dispatch:
inputs:
image-ref:
image-digest:
required: true
type: string
environment:
Expand All @@ -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

0 comments on commit 171ca76

Please sign in to comment.