v4.43.5 #117
Workflow file for this run
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
name: Deploy | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build-and-push: | |
name: Build and Push | |
runs-on: ubuntu-latest | |
env: | |
REGISTRY: registry.digitalocean.com | |
NAME: ghost/gscan | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Get version | |
run: echo "IMAGE_VERSION=$(git describe --tags)" >> $GITHUB_ENV | |
- name: Publish to DigitalOcean Registry | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
registry: ${{ env.REGISTRY }} | |
name: ${{ env.NAME }} | |
dockerfile: Dockerfile | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
tags: "latest,${{ env.IMAGE_VERSION }}" | |
- uses: matootie/dokube@v1.4.1 | |
with: | |
personalAccessToken: ${{ secrets.DIGITALOCEAN_TOKEN }} | |
clusterName: ${{ secrets.CLUSTER_NAME }} | |
- name: Update deployment | |
run: kubectl set image deployment/gscan gscan=${{ env.REGISTRY }}/${{ env.NAME }}:${{ env.IMAGE_VERSION }} |