Skip to content

feat: enhance CI/CD workflow and update Docker configurations #10

feat: enhance CI/CD workflow and update Docker configurations

feat: enhance CI/CD workflow and update Docker configurations #10

name: Docker Image CI/CD
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
runs-on: [self-hosted, linux, x64, frontend]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
- name: Build and push Docker image
run: |
docker-compose -f docker-compose.build.yml build
docker-compose -f docker-compose.build.yml push
- name: Deploy to server
run: |
docker-compose pull
docker-compose up -d
EOF

Check failure on line 34 in .github/workflows/docker-image-ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-image-ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 34