Skip to content

Merge pull request #14 from mahaputrailhamawal/cicd-pipeline #4

Merge pull request #14 from mahaputrailhamawal/cicd-pipeline

Merge pull request #14 from mahaputrailhamawal/cicd-pipeline #4

name: Push Container Registry πŸ›’
on:
push:
tags:
- '*'
jobs:
build-push:
name: Push Image To Container Registry πŸ›’
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Push current & latest pacmail-backend
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.APP_NAME }}:${{ github.ref_name }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.APP_NAME }}:latest