Skip to content

Commit

Permalink
Fix redeployment
Browse files Browse the repository at this point in the history
  • Loading branch information
floodcode committed Jul 9, 2024
1 parent 20f30e1 commit 169c0d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ inputs:
required: true
deploy-sha:
required: true
deploy-nonce:
required: true

runs:
using: "composite"
Expand All @@ -22,6 +24,7 @@ runs:
NOMAD_ADDR: ${{ inputs.nomad-addr }}
run: |
sed -i 's/DEPLOY_SHA/${{ inputs.deploy-sha }}/g' operations/deploy-${{ inputs.environment }}.hcl
sed -i 's/DEPLOY_NONCE/${{ inputs.deploy-nonce }}/g' operations/deploy-${{ inputs.environment }}.hcl
curl -L https://releases.hashicorp.com/nomad/1.6.3/nomad_1.6.3_linux_amd64.zip -o nomad.zip
unzip nomad.zip
./nomad job run operations/deploy-${{ inputs.environment }}.hcl
1 change: 1 addition & 0 deletions .github/workflows/live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ jobs:
nomad-token: ${{ secrets.NOMAD_TOKEN_DEPLOY }}
nomad-addr: ${{ secrets.NOMAD_DEPLOY_ADDR }}
deploy-sha: ${{ github.sha }}
deploy-nonce: ${{ github.run_id }}-${{ github.run_attempt }}
4 changes: 2 additions & 2 deletions operations/deploy-live.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ job "depictor-live" {
driver = "docker"

config {
image = "svforte/depictor:latest"
image = "svforte/depictor:DEPLOY_SHA"
force_pull = true
ports = ["nginx-http"]
}
Expand All @@ -36,7 +36,7 @@ job "depictor-live" {
name = "depictor-nginx"
port = "nginx-http"
tags = [
"deploy_sha=DEPLOY_SHA",
"deploy_nonce=DEPLOY_NONCE",
"traefik.enable=true",
"traefik.http.routers.depictor.entrypoints=https",
"traefik.http.routers.depictor.rule=Host(`netowork-health.dmz.ator.dev`)",
Expand Down

0 comments on commit 169c0d9

Please sign in to comment.