Skip to content

Commit

Permalink
Merge pull request #14 from bruno-lombardi/fix/deploy
Browse files Browse the repository at this point in the history
fix: deploy workflow
  • Loading branch information
bruno-lombardi authored Jun 8, 2023
2 parents d30c74a + 143d6af commit 4b0ae7a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ jobs:
if: needs.build.outputs.new-release-published == 'true'
name: "deploy"
uses: ./.github/workflows/deploy.yml
secrets: inherit
secrets: inherit
with:
version: ${{ needs.build.outputs.version }}
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: deploy

on:
workflow_call:
inputs:
version:
description: 'The version to deploy'
required: true
type: string

jobs:
deploy:
Expand All @@ -11,9 +16,9 @@ jobs:
steps:
- name: get repository files
uses: actions/checkout@v3
- name: print version from commit
- name: the version
run: |
echo "New version is $VERSION"
echo "Deploying vanir v${{ inputs.version }}"
- name: install doctl
uses: digitalocean/action-doctl@v2
with:
Expand Down Expand Up @@ -50,6 +55,7 @@ jobs:
timeout_minutes: 1
max_attempts: 3
command: |
VERSION=${{ inputs.version }}
doctl compute ssh ocean --ssh-command="docker run -d --name vanir --net senea-network -p 3334:3334 --env-file ./.env brunolombardi/vanir:$VERSION"
- name: health check
uses: nick-invision/retry@v2
Expand Down

0 comments on commit 4b0ae7a

Please sign in to comment.