feat: auto build csv

This commit is contained in:
2025-02-17 18:51:11 +07:00
parent 27589764ef
commit 61064cd06c
6 changed files with 668 additions and 0 deletions

48
.github/workflows/docker-build.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Build Docker Image
on:
push:
branches: [ main ]
paths:
- 'index.js'
- 'package.json'
- 'Dockerfile'
- '.github/workflows/docker-build.yml'
pull_request:
branches: [ main ]
paths:
- 'index.js'
- 'package.json'
- 'Dockerfile'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max