Switched to bun

This commit is contained in:
Kizuren 2025-09-02 00:19:08 +02:00
parent 590388ee48
commit 4e2c6c7626
4 changed files with 4055 additions and 18685 deletions

View file

@ -2,44 +2,109 @@ name: Build Docker Image
on:
workflow_dispatch:
#release:
# types: [created]
release:
types: [created]
jobs:
build:
# Update lockfile for Dependabot PRs
update-lockfile:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'dependabot/')
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: oven-sh/setup-bun@v2
- name: Install and update lockfile
run: bun install
- name: Commit and push updated lockfile
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add bun.lock
git commit -m "chore: update lockfile (auto-fix for Dependabot PR)" || exit 0
git push
# Build and don't push Docker image for Dependabot PRs
build_dependabot:
runs-on: ubuntu-latest
needs: update-lockfile
if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'dependabot/')
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=short
type=ref,event=branch
type=ref,event=pr
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: false
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64, linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'dependabot/'))
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=short
type=ref,event=branch
type=ref,event=pr
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}