add docker container

This commit is contained in:
2025-03-19 10:19:19 +08:00
parent b8b73ba6f2
commit 4eb69ca8f1
5 changed files with 54 additions and 2 deletions

View File

@@ -7,6 +7,10 @@ on:
push:
branches: [ "master" ]
env:
DOCKERHUB_SLUG: megghy/vtsuru_live
GHCR_SLUG: ghcr.io/megghy/vtsuru_live
jobs:
build:
@@ -24,3 +28,33 @@ jobs:
run: bun run build
- name: 📦 Upload SourceMap
run: bunx @hyperdx/cli upload-sourcemaps --serviceKey ${{ secrets.HYPERDX_SERVICE_KEY }} --path dist/assets
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.DOCKERHUB_SLUG }}
${{ env.GHCR_SLUG }}
- name: Get current time
uses: josStorer/get-current-time@v2
id: time
with:
format: YYYYMMDD_HHmmss
utcOffset: "+08:00"
- name: Build Docker image and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ env.GHCR_SLUG }}:latest
${{ env.GHCR_SLUG }}:${{ steps.time.outputs.formattedTime }}