70 lines
2.4 KiB
YAML
70 lines
2.4 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'bee-dashboard/**'
|
|
- '.gitea/workflows/build-bee-dashboard.yaml'
|
|
jobs:
|
|
"Build & deploy Cloudflare page":
|
|
runs-on: hostinger
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: docker-images
|
|
- name: Checkout bee-dashboard sources
|
|
run: /usr/sbin/git clone -b add-redistribution-stats --depth 1 https://github.com/woggioni/bee-dashboard.git src
|
|
# uses: actions/checkout@v4
|
|
# with:
|
|
|
|
# repository: woggioni/bee-dashboard.git
|
|
# ref: add-redistribution-stats
|
|
# path: src
|
|
# github-server-url: "git://github.com"
|
|
# persist-credentials: false
|
|
# token: ${{ secrets.CLONE_TOKEN }}
|
|
- name: Execute build
|
|
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: hostinger
|
|
steps:
|
|
-
|
|
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
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: gitea.woggioni.net
|
|
username: woggioni
|
|
password: ${{ secrets.PUBLISHER_TOKEN }}
|
|
-
|
|
name: Build and push bee-dashboard images
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: |
|
|
linux/amd64
|
|
linux/arm64
|
|
context: "{{defaultContext}}:bee-dashboard"
|
|
push: true
|
|
pull: true
|
|
ssh: default=/home/luser/.ssh/id_ed25519
|
|
build-args: "VERSION=0.32.0"
|
|
tags: |
|
|
"gitea.woggioni.net/woggioni/bee-dashboard:0.32.0"
|
|
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
|