Skip to content

Build and push image #4

Build and push image

Build and push image #4

name: Build and push image
on:
workflow_dispatch:
env:
IMAGE_NAMESPACE: csiesnmg
IMAGE_NAME: pure-ftpd-mysql
jobs:
build-and-push-image:
runs-on: ubuntu-latest
name: "Build Docker image and push to Docker Hub"
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build frontend and push
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:latest,${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:bookworm