ci: Update workflows to use dev

This commit is contained in:
Wanjohi
2025-07-20 23:46:05 +03:00
parent 5315daa932
commit 85d6fdd213
4 changed files with 17 additions and 15 deletions

View File

@@ -6,7 +6,7 @@ on:
- "apps/docs/**"
- ".github/workflows/docs.yml"
push:
branches: [main]
branches: [dev]
paths:
- "apps/docs/**"
- ".github/workflows/docs.yml"
@@ -37,4 +37,4 @@ jobs:
workingDirectory: "apps/docs"
command: pages deploy ./dist --project-name=${{ vars.CF_DOCS_PAGES_PROJECT_NAME }} --commit-dirty=true
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

View File

@@ -8,7 +8,7 @@ on:
- "packages/relay/**"
- ".github/workflows/relay.yml"
push:
branches: [main]
branches: [dev, production]
paths:
- "containers/relay.Containerfile"
- ".github/workflows/relay.yml"
@@ -45,9 +45,9 @@ jobs:
load: true
tags: nestri:relay
build-docker-main:
name: Build image on main
if: ${{ github.ref == 'refs/heads/main' }}
build-and-push-docker:
name: Build and push image
if: ${{ github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/production' }}
runs-on: ubuntu-latest
permissions:
contents: read
@@ -73,7 +73,8 @@ jobs:
#tag on release, and a nightly build for 'dev'
tags: |
type=raw,value=nightly,enable={{is_default_branch}}
type=ref,event=tag
type=raw,value={{branch}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'production') }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
@@ -85,4 +86,4 @@ jobs:
context: ./
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -12,7 +12,7 @@ on:
schedule:
- cron: 7 0 * * 1,3,6 # Regularly to keep that build cache warm
push:
branches: [main]
branches: [dev, production]
paths:
- "containers/runner.Containerfile"
- ".github/workflows/runner.yml"
@@ -66,9 +66,9 @@ jobs:
cache-from: type=gha,mode=max
cache-to: type=gha,mode=max
build-docker-main:
name: Build image on main
if: ${{ github.ref == 'refs/heads/main' }}
build-and-push-docker:
name: Build and push image
if: ${{ github.ref == 'refs/heads/production' || github.ref == 'refs/heads/dev' }}
runs-on: ubuntu-latest
permissions:
contents: read
@@ -94,7 +94,8 @@ jobs:
#tag on release, and a nightly build for 'dev'
tags: |
type=raw,value=nightly,enable={{is_default_branch}}
type=ref,event=tag
type=raw,value={{branch}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'production') }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

View File

@@ -6,7 +6,7 @@ on:
- "apps/www/**"
- ".github/workflows/www.yml"
push:
branches: [main]
branches: [dev]
paths:
- "apps/www/**"
- ".github/workflows/www.yml"
@@ -37,4 +37,4 @@ jobs:
workingDirectory: "apps/www"
command: pages deploy ./dist --project-name=${{ vars.CF_WWW_PAGES_PROJECT_NAME }} --commit-dirty=true
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}