Skip to content

fix: update github action #2

fix: update github action

fix: update github action #2

name: Build and Push Docker Images
on:
push:
branches:
- main # Trigger on pushes to the main branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Setup docker-compose
uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: 'v2.28.1'
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker images
run: |
docker-compose build
docker-compose push
# - name: Deploy or other steps
# Add additional steps here, if needed (e.g., deploy to a server)