Files
vps-tracker/.github/workflows/docker.yml
T
Denozordec a32f3420f9
Docker / build (push) Failing after 2m55s
Update README and server configuration for VPS Tracker application
- Renamed project from "React + Vite" to "VPS Tracker" and updated the README to reflect the application's purpose and usage instructions.
- Added detailed Docker setup instructions, including two methods for running the application: using Docker Compose and standalone Docker.
- Implemented static file serving in the server configuration to serve the frontend from the 'dist' directory if it exists, enhancing the application's deployment capabilities.
2026-03-20 23:24:32 +07:00

46 lines
1.2 KiB
YAML

name: Docker
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
type=sha
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}