Skip to content

Docker Build and Push #8

Docker Build and Push

Docker Build and Push #8

Workflow file for this run

name: Docker Build
on:
workflow_run:
workflows: ["release-please"]
types:
- completed
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Latest Tag
id: get-latest-tag
run: |
echo "LATEST_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/whatsapp-blast:latest
${{ secrets.DOCKER_USERNAME }}/whatsapp-blast:${{ env.LATEST_TAG }}