mirror of
https://github.com/Alvin-Zilverstand/narrow_casting_system.git
synced 2026-03-06 13:24:46 +01:00
🐳 Update to modern Docker Compose v2 and fix GitHub Actions CI/CD
- Update docker-compose.yml to use modern 'docker compose' syntax (v2) - Fix GitHub Actions Docker login to use GitHub Container Registry (ghcr.io) - Add comprehensive GitHub repository settings documentation - Add alternative CI/CD workflow without Docker push requirement - Update package.json scripts for modern Docker commands - Add Docker security scanning and metadata extraction - Add repository permissions configuration for GitHub Actions - Update Docker documentation with modern practices This addresses the Docker login issues and modernizes the deployment process while providing fallback options for CI/CD implementation.
This commit is contained in:
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -114,6 +114,9 @@ jobs:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -122,11 +125,12 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
@@ -135,8 +139,8 @@ jobs:
|
||||
file: ./deployment/docker/Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
snowworld/narrowcasting:latest
|
||||
snowworld/narrowcasting:${{ github.sha }}
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ github.sha }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user