optimized bee-dashboard build
All checks were successful
CI / Build & deploy Cloudflare page (push) Successful in 2m43s

This commit is contained in:
2025-12-12 21:33:11 +08:00
parent 022fa66288
commit 148e35bbef
2 changed files with 17 additions and 29 deletions

View File

@@ -7,7 +7,7 @@ on:
- '.gitea/workflows/build-bee-dashboard.yaml'
jobs:
"Build & deploy Cloudflare page":
runs-on: hostinger
runs-on: woryzen
steps:
- name: Checkout sources
uses: actions/checkout@v4
@@ -19,37 +19,30 @@ jobs:
run: cd src && npm install
- name: Copy _headers file
run: cp docker-images/bee-dashboard/_headers src/build
- name: Deploy to Cloudflare
run: npx wrangler pages deploy --project-name bee-dashboard --branch main src/build
env:
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
"Build bee-dashboard docker images":
runs-on: woryzen
steps:
-
name: Set up Docker Buildx
- name: Create archive
run: tar -czf docker-images/bee-dashboard/bee-dashboard.tar -C src/build .
- name: Publish archive to gitea.woggioni.net
run: curl --user woggioni:${{ secrets.PUBLISHER_TOKEN }} --upload-file docker-images/bee-dashboard/bee-dashboard.tar https://gitea.woggioni.net/api/packages/woggioni/generic/bee-dashboard/0.33.3/bee-dashboard.tar
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.4.0
with:
driver: docker-container
platforms: |
linux/amd64
linux/arm64
-
name: Login to Gitea container registry
- name: Login to Gitea container registry
uses: docker/login-action@v3
with:
registry: gitea.woggioni.net
username: woggioni
password: ${{ secrets.PUBLISHER_TOKEN }}
-
name: Build and push bee-dashboard images
- name: Build and push bee-dashboard images
uses: docker/build-push-action@v6
with:
platforms: |
linux/amd64
linux/arm64
context: "{{defaultContext}}:bee-dashboard"
context: "docker-images/bee-dashboard"
push: true
pull: true
ssh: default=/home/luser/.ssh/id_ed25519
@@ -58,3 +51,8 @@ jobs:
"gitea.woggioni.net/woggioni/bee-dashboard:0.33.3"
cache-from: type=registry,ref=gitea.woggioni.net/woggioni/bee-dashboard:buildx
cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/bee-dashboard:buildx
- name: Deploy to Cloudflare
run: npx wrangler pages deploy --project-name bee-dashboard --branch main src/build
env:
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}