Skip to content

Commit

Permalink
Merge pull request #28 from seroanalytics/digitalocean
Browse files Browse the repository at this point in the history
try update tag
  • Loading branch information
hillalex authored Nov 28, 2024
2 parents 37441bf + aa0aa1d commit 79937d5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,22 @@ jobs:
- name: 🚢 Push image
run: ./scripts/push

- name: Install doctl
uses: digitalocean/action-doctl@v2
- id: sha
name: Setup Environment
shell: bash
run: |
if [[ -v "GITHUB_SHA" ]]; then
GIT_SHA=${GITHUB_SHA:0:7}
else
GIT_SHA=$(git rev-parse --short=7 HEAD)
fi
echo "GIT_SHA=${GIT_SHA}" >> $GITHUB_OUTPUT
- name: Deploy the app
uses: digitalocean/app_action/deploy@v2
env:
IMAGE_TAG_SEROVIZ: ${{ steps.sha.outputs.GIT_SHA }}
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: Deploy
run: doctl apps create-deployment ${{ secrets.DIGITALOCEAN_APP_ID }} --force-rebuild=true
app_name: seroviz
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
2 changes: 2 additions & 0 deletions scripts/common
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ fi

DOCKER_COMMIT_TAG="${PACKAGE_ORG}/${PACKAGE_NAME}:${GIT_SHA}"
DOCKER_BRANCH_TAG="${PACKAGE_ORG}/${PACKAGE_NAME}:${GIT_BRANCH}"

echo $GIT_SHA

0 comments on commit 79937d5

Please sign in to comment.