ci: automatic update ghcr & push nginx
This commit is contained in:
38
.github/workflows/release-build.yml
vendored
Normal file
38
.github/workflows/release-build.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Build and Publish Docker Images
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and Push Backend Image
|
||||
run: |
|
||||
docker build -t ghcr.io/antebrl/iptv-restream/backend:${{ github.event.release.tag_name }} ./backend
|
||||
docker push ghcr.io/antebrl/iptv-restream/backend:${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Build and Push Frontend Image
|
||||
run: |
|
||||
docker build --build-arg VITE_BACKEND_STREAMS_PATH=/streams/ --build-arg VITE_STREAM_DELAY=18 -t ghcr.io/antebrl/iptv-restream/frontend:${{ github.event.release.tag_name }} ./frontend
|
||||
docker push ghcr.io/antebrl/iptv-restream/frontend:${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Build and Push Nginx Image
|
||||
run: |
|
||||
docker build -t ghcr.io/antebrl/iptv-restream/nginx:${{ github.event.release.tag_name }} ./deployment/nginx
|
||||
docker push ghcr.io/antebrl/iptv-restream/nginx:${{ github.event.release.tag_name }}
|
||||
@@ -34,7 +34,7 @@ services:
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ../nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- streams_data:/streams
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
frontend:
|
||||
image: ghcr.io/antebrl/iptv-restream/frontend:v1
|
||||
image: ghcr.io/antebrl/iptv-restream/frontend:v2
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
backend:
|
||||
image: ghcr.io/antebrl/iptv-restream/backend:v1
|
||||
image: ghcr.io/antebrl/iptv-restream/backend:v2
|
||||
volumes:
|
||||
- streams_data:/streams
|
||||
environment:
|
||||
@@ -17,12 +17,11 @@ services:
|
||||
|
||||
# Nginx Reverse Proxy
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
image: ghcr.io/antebrl/iptv-restream/nginx:v2
|
||||
volumes:
|
||||
- ../nginx.conf:/etc/nginx/nginx.conf
|
||||
- streams_data:/streams
|
||||
ports:
|
||||
- "80:80"
|
||||
- "80:80" # Configure exposed port, if 80 is already in use e.g. 8080:80
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
|
||||
3
deployment/nginx/Dockerfile
Normal file
3
deployment/nginx/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
@@ -34,7 +34,7 @@ services:
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./deployment/nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- streams_data:/streams
|
||||
ports:
|
||||
- "80:80"
|
||||
|
||||
Reference in New Issue
Block a user