chore(deps): bump digitalocean/app_action from 1.1.6 to 2 (#314) #301
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: docker-push-dockerhub | |
on: | |
push: | |
branches: ["master"] | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Log in to docker.io | |
uses: docker/[email protected] | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKER_NAME }} | |
password: ${{ secrets.DOCKER_PAT }} | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date -u '+%F-%T')" | |
- name: Get short SHA | |
id: sha | |
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)" | |
- name: Build and push Docker image bullseye | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
build-args: | | |
COMMITHASH=${{ steps.sha.outputs.sha }} | |
BUILDTIME=${{ steps.date.outputs.date }} | |
tags: docker.io/${{ secrets.DOCKER_NAME }}/moksha-mint:${{ steps.sha.outputs.sha }}-bullseye, docker.io/${{ secrets.DOCKER_NAME }}/moksha-mint:bullseye | |
- name: Build and push Docker image alpine | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile.alpine | |
push: true | |
build-args: | | |
COMMITHASH=${{ steps.sha.outputs.sha }} | |
BUILDTIME=${{ steps.date.outputs.date }} | |
tags: docker.io/${{ secrets.DOCKER_NAME }}/moksha-mint:latest, docker.io/${{ secrets.DOCKER_NAME }}/moksha-mint:${{ steps.sha.outputs.sha }}-alpine | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build-and-push | |
steps: | |
- name: DigitalOcean App Platform deployment | |
uses: digitalocean/app_action@v2 | |
with: | |
app_name: moksha-mint | |
token: ${{ secrets.DO_TOKEN }} |