mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 07:40:43 +00:00
create a nightly build
This commit is contained in:
@@ -34,6 +34,11 @@ on:
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
# Nightly build: rebuild and deploy main to nightly.openfront.dev
|
||||
# 10:00 UTC = 3:00 AM PDT (2:00 AM PST during winter)
|
||||
schedule:
|
||||
- cron: "0 10 * * *"
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
@@ -42,8 +47,8 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
# Don't deploy on push if this is a fork
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || github.repository == 'openfrontio/OpenFrontIO' }}
|
||||
# Don't deploy on push if this is a fork; always deploy on schedule and workflow_dispatch
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || github.repository == 'openfrontio/OpenFrontIO' }}
|
||||
# Use different logic based on event type
|
||||
name: Deploy to ${{ inputs.target_domain || 'openfront.dev' }}
|
||||
runs-on: ubuntu-latest
|
||||
@@ -51,7 +56,7 @@ jobs:
|
||||
environment: ${{ inputs.target_domain == 'openfront.io' && 'prod' || '' }}
|
||||
env:
|
||||
DOMAIN: ${{ inputs.target_domain || 'openfront.dev' }}
|
||||
SUBDOMAIN: ${{ github.event_name == 'push' && github.ref_name || inputs.target_subdomain || 'main' }}
|
||||
SUBDOMAIN: ${{ github.event_name == 'schedule' && 'nightly' || github.event_name == 'push' && github.ref_name || inputs.target_subdomain || 'main' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: 📝 Update job summary
|
||||
@@ -129,7 +134,7 @@ jobs:
|
||||
GHCR_REPO: ${{ vars.GHCR_REPO }}
|
||||
GHCR_USERNAME: ${{ vars.GHCR_USERNAME }}
|
||||
ENV: ${{ inputs.target_domain == 'openfront.io' && 'prod' || 'staging' }}
|
||||
HOST: ${{ github.event_name == 'workflow_dispatch' && inputs.target_host || 'staging' }}
|
||||
HOST: ${{ github.event_name == 'workflow_dispatch' && inputs.target_host || 'staging' }} # schedule and push both use staging
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}
|
||||
OTEL_AUTH_HEADER: ${{ secrets.OTEL_AUTH_HEADER }}
|
||||
TURNSTILE_SECRET_KEY: ${{ secrets.TURNSTILE_SECRET_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user