Skip to content
name: Build and publish Frontend Service to Docker Hub
on:
push:
branches: ['main']
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create Buildx builder
run: docker buildx create --name mybuilder --use
- name: Inspect Buildx builder
run: docker buildx inspect mybuilder --bootstrap
- name: Build and push Docker image
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag thakiyudheen/learnup-client:latest \
--push .