mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-02 21:03:34 +03:00
Remove depot.dev support from GitHub Actions workflows (#7148)
This commit is contained in:
@@ -23,13 +23,9 @@ permissions:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
check-pr:
|
check-pr:
|
||||||
if: (github.event_name == 'pull_request' && github.event.action != 'closed') || github.event_name == 'workflow_dispatch'
|
if: (github.event_name == 'pull_request' && github.event.action != 'closed') || github.event_name == 'workflow_dispatch'
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
outputs:
|
outputs:
|
||||||
should_deploy: ${{ steps.decide.outputs.should_deploy }}
|
should_deploy: ${{ steps.decide.outputs.should_deploy }}
|
||||||
is_fork: ${{ steps.resolve.outputs.is_fork }}
|
is_fork: ${{ steps.resolve.outputs.is_fork }}
|
||||||
@@ -101,8 +97,8 @@ jobs:
|
|||||||
echo "allow_fork=${allow_fork:-false}" >> $GITHUB_OUTPUT
|
echo "allow_fork=${allow_fork:-false}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
deploy-v2-pr:
|
deploy-v2-pr:
|
||||||
needs: [pick, check-pr]
|
needs: check-pr
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
runs-on: ubuntu-latest
|
||||||
if: needs.check-pr.outputs.should_deploy == 'true' && (needs.check-pr.outputs.is_fork == 'false' || needs.check-pr.outputs.allow_fork == 'true')
|
if: needs.check-pr.outputs.should_deploy == 'true' && (needs.check-pr.outputs.is_fork == 'false' || needs.check-pr.outputs.allow_fork == 'true')
|
||||||
# Concurrency control - only one deployment per PR at a time
|
# Concurrency control - only one deployment per PR at a time
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -112,10 +108,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
id-token: write
|
|
||||||
env:
|
env:
|
||||||
USE_DEPOT: ${{ needs.pick.outputs.use_depot == 'true' }}
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
# Single source of truth for whether this preview embeds the admin portal:
|
# Single source of truth for whether this preview embeds the admin portal:
|
||||||
# drives the image build-arg and the deployment comment.
|
# drives the image build-arg and the deployment comment.
|
||||||
BUILD_PORTAL: "true"
|
BUILD_PORTAL: "true"
|
||||||
@@ -190,12 +183,7 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
fetch-depth: 0 # Fetch full history for commit hash detection
|
fetch-depth: 0 # Fetch full history for commit hash detection
|
||||||
|
|
||||||
- name: Set up Depot CLI
|
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/setup-action@15c09a5f77a0840ad4bce955686522a257853461 # v1.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||||
|
|
||||||
- name: Get version number
|
- name: Get version number
|
||||||
@@ -240,22 +228,8 @@ jobs:
|
|||||||
echo "Image needs to be built"
|
echo "Image needs to be built"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build and push V2 image (Depot)
|
- name: Build and push V2 image
|
||||||
if: env.USE_DEPOT == 'true' && steps.check-image.outputs.exists == 'false'
|
if: steps.check-image.outputs.exists == 'false'
|
||||||
uses: depot/build-push-action@98e78adca7817480b8185f474a400b451d74e287 # v1.16.0
|
|
||||||
with:
|
|
||||||
project: ${{ vars.DEPOT_PROJECT_ID }}
|
|
||||||
context: .
|
|
||||||
file: ./docker/embedded/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/test:v2-${{ steps.commit-hash.outputs.app_short }}
|
|
||||||
build-args: |
|
|
||||||
VERSION_TAG=v2-alpha
|
|
||||||
BUILD_PORTAL=${{ env.BUILD_PORTAL }}
|
|
||||||
platforms: linux/amd64
|
|
||||||
|
|
||||||
- name: Build and push V2 image (Docker fork fallback)
|
|
||||||
if: env.USE_DEPOT != 'true' && steps.check-image.outputs.exists == 'false'
|
|
||||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@@ -474,8 +448,7 @@ jobs:
|
|||||||
|
|
||||||
cleanup-v2-deployment:
|
cleanup-v2-deployment:
|
||||||
if: github.event.action == 'closed'
|
if: github.event.action == 'closed'
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
|
|||||||
@@ -34,12 +34,8 @@ permissions:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
check-comment:
|
check-comment:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
if: |
|
if: |
|
||||||
@@ -179,15 +175,11 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
deploy-pr:
|
deploy-pr:
|
||||||
needs: [pick, check-comment]
|
needs: check-comment
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
id-token: write
|
|
||||||
env:
|
|
||||||
USE_DEPOT: ${{ needs.pick.outputs.use_depot == 'true' }}
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
@@ -240,12 +232,7 @@ jobs:
|
|||||||
MAVEN_PUBLIC_URL: ${{ secrets.MAVEN_PUBLIC_URL }}
|
MAVEN_PUBLIC_URL: ${{ secrets.MAVEN_PUBLIC_URL }}
|
||||||
STIRLING_PDF_DESKTOP_UI: false
|
STIRLING_PDF_DESKTOP_UI: false
|
||||||
|
|
||||||
- name: Set up Depot CLI
|
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/setup-action@15c09a5f77a0840ad4bce955686522a257853461 # v1.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
@@ -254,22 +241,7 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_HUB_API }}
|
password: ${{ secrets.DOCKER_HUB_API }}
|
||||||
|
|
||||||
- name: Build and push PR-specific image (Depot)
|
- name: Build and push PR-specific image
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/build-push-action@98e78adca7817480b8185f474a400b451d74e287 # v1.16.0
|
|
||||||
with:
|
|
||||||
project: ${{ vars.DEPOT_PROJECT_ID }}
|
|
||||||
context: .
|
|
||||||
file: ./docker/embedded/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/test:pr-${{ needs.check-comment.outputs.pr_number }}
|
|
||||||
build-args: |
|
|
||||||
VERSION_TAG=alpha
|
|
||||||
PROTOTYPES_BUILD=${{ needs.check-comment.outputs.enable_prototypes }}
|
|
||||||
platforms: linux/amd64
|
|
||||||
|
|
||||||
- name: Build and push PR-specific image (Docker fork fallback)
|
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@@ -283,19 +255,8 @@ jobs:
|
|||||||
PROTOTYPES_BUILD=${{ needs.check-comment.outputs.enable_prototypes }}
|
PROTOTYPES_BUILD=${{ needs.check-comment.outputs.enable_prototypes }}
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
|
|
||||||
- name: Build and push engine image (Depot)
|
- name: Build and push engine image
|
||||||
if: env.USE_DEPOT == 'true' && needs.check-comment.outputs.enable_prototypes == 'true'
|
if: needs.check-comment.outputs.enable_prototypes == 'true'
|
||||||
uses: depot/build-push-action@98e78adca7817480b8185f474a400b451d74e287 # v1.16.0
|
|
||||||
with:
|
|
||||||
project: ${{ vars.DEPOT_PROJECT_ID }}
|
|
||||||
context: ./engine
|
|
||||||
file: ./engine/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/test:engine-pr-${{ needs.check-comment.outputs.pr_number }}
|
|
||||||
platforms: linux/amd64
|
|
||||||
|
|
||||||
- name: Build and push engine image (Docker fork fallback)
|
|
||||||
if: env.USE_DEPOT != 'true' && needs.check-comment.outputs.enable_prototypes == 'true'
|
|
||||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: ./engine
|
context: ./engine
|
||||||
@@ -510,8 +471,7 @@ jobs:
|
|||||||
|
|
||||||
handle-label-commands:
|
handle-label-commands:
|
||||||
if: ${{ github.event.issue.pull_request != null }}
|
if: ${{ github.event.issue.pull_request != null }}
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -2,13 +2,8 @@ name: _runner-pick
|
|||||||
|
|
||||||
# Tiny reusable workflow that classifies the trigger as either a "fork PR
|
# Tiny reusable workflow that classifies the trigger as either a "fork PR
|
||||||
# from an untrusted contributor" or a "trusted commit" so downstream jobs
|
# from an untrusted contributor" or a "trusted commit" so downstream jobs
|
||||||
# can pick a runner class without each one duplicating the 200-char gate
|
# can trust-gate (skip secret-dependent jobs on forks) without each one
|
||||||
# expression in their own `runs-on:`.
|
# duplicating the gate expression.
|
||||||
#
|
|
||||||
# It also owns the single Depot kill-switch (use_depot). Depot is currently
|
|
||||||
# disabled repo-wide; downstream jobs gate their Depot runner/build usage on
|
|
||||||
# use_depot so nothing has to be deleted to turn Depot off. Flip DEPOT_ENABLED
|
|
||||||
# in the decide step to switch Depot back on.
|
|
||||||
#
|
#
|
||||||
# Caller pattern:
|
# Caller pattern:
|
||||||
#
|
#
|
||||||
@@ -18,15 +13,12 @@ name: _runner-pick
|
|||||||
#
|
#
|
||||||
# real-work:
|
# real-work:
|
||||||
# needs: pick
|
# needs: pick
|
||||||
# runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-8' || 'ubuntu-latest' }}
|
# if: needs.pick.outputs.is_fork != 'true'
|
||||||
# steps: [...]
|
# steps: [...]
|
||||||
#
|
#
|
||||||
# Outputs:
|
# Outputs:
|
||||||
# is_fork: "true" when the trigger is a pull_request from a fork or an
|
# is_fork: "true" when the trigger is a pull_request from a fork or an
|
||||||
# untrusted author_association, "false" otherwise. Use this for
|
# untrusted author_association, "false" otherwise.
|
||||||
# trust gating (skipping secret-dependent jobs on forks).
|
|
||||||
# use_depot: "true" when downstream jobs should use Depot runners/builders.
|
|
||||||
# Currently forced "false" (Depot disabled repo-wide).
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
@@ -34,9 +26,6 @@ on:
|
|||||||
is_fork:
|
is_fork:
|
||||||
description: '"true" if the trigger is an untrusted fork PR.'
|
description: '"true" if the trigger is an untrusted fork PR.'
|
||||||
value: ${{ jobs.pick.outputs.is_fork }}
|
value: ${{ jobs.pick.outputs.is_fork }}
|
||||||
use_depot:
|
|
||||||
description: '"true" when downstream jobs should use Depot. Currently forced off.'
|
|
||||||
value: ${{ jobs.pick.outputs.use_depot }}
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -47,7 +36,6 @@ jobs:
|
|||||||
timeout-minutes: 1
|
timeout-minutes: 1
|
||||||
outputs:
|
outputs:
|
||||||
is_fork: ${{ steps.decide.outputs.is_fork }}
|
is_fork: ${{ steps.decide.outputs.is_fork }}
|
||||||
use_depot: ${{ steps.decide.outputs.use_depot }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
@@ -63,12 +51,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Depot kill-switch. Depot is disabled repo-wide: no job uses Depot
|
|
||||||
# runners or the Depot build actions while this is false. All the
|
|
||||||
# Depot wiring is left in place - set DEPOT_ENABLED=true to switch it
|
|
||||||
# back on (it then activates on trusted, non-fork triggers as before).
|
|
||||||
DEPOT_ENABLED=false
|
|
||||||
|
|
||||||
if [ -z "${PR_NUMBER:-}" ]; then
|
if [ -z "${PR_NUMBER:-}" ]; then
|
||||||
# Not a pull_request event at all (push, schedule, workflow_dispatch,
|
# Not a pull_request event at all (push, schedule, workflow_dispatch,
|
||||||
# workflow_call from a non-PR trigger) -> trusted by default.
|
# workflow_call from a non-PR trigger) -> trusted by default.
|
||||||
@@ -82,13 +64,4 @@ jobs:
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Depot only ever ran on trusted triggers, so gate it on both the
|
|
||||||
# kill-switch and is_fork.
|
|
||||||
if [ "${DEPOT_ENABLED}" = "true" ] && [ "${is_fork}" = "false" ]; then
|
|
||||||
use_depot=true
|
|
||||||
else
|
|
||||||
use_depot=false
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "is_fork=${is_fork}" >> "$GITHUB_OUTPUT"
|
echo "is_fork=${is_fork}" >> "$GITHUB_OUTPUT"
|
||||||
echo "use_depot=${use_depot}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -19,14 +19,8 @@ permissions:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-8' || 'ubuntu-latest' }}
|
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
@@ -15,23 +15,11 @@ name: Enterprise E2E (Playwright)
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
|
||||||
depot_cores:
|
|
||||||
description: "Depot runner vCPU count (used in runs-on). Override for benchmarking."
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: "8"
|
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 4 * * *"
|
- cron: "0 4 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
depot_cores:
|
|
||||||
description: "Depot runner vCPU count (used in runs-on). Override for benchmarking."
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: "8"
|
|
||||||
|
|
||||||
# No `concurrency:` block here on purpose. When this workflow is called via
|
# No `concurrency:` block here on purpose. When this workflow is called via
|
||||||
# workflow_call from build.yml, ${{ github.workflow }}/event_name/pr_number
|
# workflow_call from build.yml, ${{ github.workflow }}/event_name/pr_number
|
||||||
@@ -50,17 +38,16 @@ jobs:
|
|||||||
|
|
||||||
playwright-e2e-enterprise:
|
playwright-e2e-enterprise:
|
||||||
needs: pick
|
needs: pick
|
||||||
# Skip on fork PRs / untrusted authors: they have no PREMIUM_KEY_ENTERPRISE
|
# Skip on fork PRs / untrusted authors: they have no PREMIUM_KEY_ENTERPRISE,
|
||||||
# (nor DEPOT_TOKEN), so the suite can't boot premium and would fail. See the
|
# so the suite can't boot premium and would fail. See the header comment.
|
||||||
# header comment. GitHub reports the skipped reusable workflow as success.
|
# GitHub reports the skipped reusable workflow as success.
|
||||||
if: needs.pick.outputs.is_fork != 'true'
|
if: needs.pick.outputs.is_fork != 'true'
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && format('depot-ubuntu-24.04-{0}', inputs.depot_cores || '8') || 'ubuntu-latest' }}
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
env:
|
env:
|
||||||
PREMIUM_KEY: ${{ secrets.PREMIUM_KEY_ENTERPRISE }}
|
PREMIUM_KEY: ${{ secrets.PREMIUM_KEY_ENTERPRISE }}
|
||||||
PREMIUM_ENABLED: "true"
|
PREMIUM_ENABLED: "true"
|
||||||
SYSTEM_ENABLEANALYTICS: "false"
|
SYSTEM_ENABLEANALYTICS: "false"
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -149,7 +149,6 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
id-token: write
|
|
||||||
uses: ./.github/workflows/test-build-docker.yml
|
uses: ./.github/workflows/test-build-docker.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
check-licence:
|
check-licence:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -10,14 +10,8 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
check-generate-openapi-docs:
|
check-generate-openapi-docs:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -29,12 +29,8 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
aggregate:
|
aggregate:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
|
|||||||
@@ -12,15 +12,9 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
migration-test:
|
migration-test:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-8' || 'ubuntu-latest' }}
|
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -10,21 +10,11 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
deploy-v2-on-push:
|
deploy-v2-on-push:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: deploy-v2-push-V2
|
group: deploy-v2-push-V2
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
env:
|
|
||||||
USE_DEPOT: ${{ needs.pick.outputs.use_depot == 'true' }}
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
@@ -35,12 +25,7 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Set up Depot CLI
|
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/setup-action@15c09a5f77a0840ad4bce955686522a257853461 # v1.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||||
|
|
||||||
- name: Get commit hashes for frontend and backend
|
- name: Get commit hashes for frontend and backend
|
||||||
@@ -105,22 +90,8 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_HUB_API }}
|
password: ${{ secrets.DOCKER_HUB_API }}
|
||||||
|
|
||||||
- name: Build and push frontend image (Depot)
|
- name: Build and push frontend image
|
||||||
if: env.USE_DEPOT == 'true' && steps.check-frontend.outputs.exists == 'false'
|
if: steps.check-frontend.outputs.exists == 'false'
|
||||||
uses: depot/build-push-action@98e78adca7817480b8185f474a400b451d74e287 # v1.16.0
|
|
||||||
with:
|
|
||||||
project: ${{ vars.DEPOT_PROJECT_ID }}
|
|
||||||
context: .
|
|
||||||
file: ./docker/frontend/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
${{ secrets.DOCKER_HUB_USERNAME }}/test:v2-frontend-${{ steps.commit-hashes.outputs.frontend_short }}
|
|
||||||
${{ secrets.DOCKER_HUB_USERNAME }}/test:v2-frontend-latest
|
|
||||||
build-args: VERSION_TAG=v2-alpha
|
|
||||||
platforms: linux/amd64
|
|
||||||
|
|
||||||
- name: Build and push frontend image (Docker fork fallback)
|
|
||||||
if: env.USE_DEPOT != 'true' && steps.check-frontend.outputs.exists == 'false'
|
|
||||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@@ -134,22 +105,8 @@ jobs:
|
|||||||
build-args: VERSION_TAG=v2-alpha
|
build-args: VERSION_TAG=v2-alpha
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
|
|
||||||
- name: Build and push backend image (Depot)
|
- name: Build and push backend image
|
||||||
if: env.USE_DEPOT == 'true' && steps.check-backend.outputs.exists == 'false'
|
if: steps.check-backend.outputs.exists == 'false'
|
||||||
uses: depot/build-push-action@98e78adca7817480b8185f474a400b451d74e287 # v1.16.0
|
|
||||||
with:
|
|
||||||
project: ${{ vars.DEPOT_PROJECT_ID }}
|
|
||||||
context: .
|
|
||||||
file: ./docker/backend/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
${{ secrets.DOCKER_HUB_USERNAME }}/test:v2-backend-${{ steps.commit-hashes.outputs.backend_short }}
|
|
||||||
${{ secrets.DOCKER_HUB_USERNAME }}/test:v2-backend-latest
|
|
||||||
build-args: VERSION_TAG=v2-alpha
|
|
||||||
platforms: linux/amd64
|
|
||||||
|
|
||||||
- name: Build and push backend image (Docker fork fallback)
|
|
||||||
if: env.USE_DEPOT != 'true' && steps.check-backend.outputs.exists == 'false'
|
|
||||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
|||||||
@@ -11,28 +11,17 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: "false"
|
default: "false"
|
||||||
depot_cores:
|
|
||||||
description: "Depot runner vCPU count (used in runs-on). Override for benchmarking. Tuned to 4 because bench showed 16 was within noise of 4."
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: "4"
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
docker-compose-tests:
|
docker-compose-tests:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && format('depot-ubuntu-24.04-{0}', inputs.depot_cores || '4') || 'ubuntu-latest' }}
|
|
||||||
permissions:
|
permissions:
|
||||||
actions: write
|
actions: write
|
||||||
contents: read
|
contents: read
|
||||||
checks: write
|
checks: write
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
|
|||||||
@@ -5,23 +5,13 @@ name: Playwright E2E (live backend)
|
|||||||
# server.
|
# server.
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
|
||||||
depot_cores:
|
|
||||||
description: "Depot runner vCPU count (used in runs-on). Override for benchmarking."
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: "8"
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
playwright-e2e-live:
|
playwright-e2e-live:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && format('depot-ubuntu-24.04-{0}', inputs.depot_cores || '8') || 'ubuntu-latest' }}
|
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
|
|||||||
@@ -5,23 +5,13 @@ name: Playwright E2E (stubbed)
|
|||||||
# mocks API responses in the browser.
|
# mocks API responses in the browser.
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
|
||||||
depot_cores:
|
|
||||||
description: "Depot runner vCPU count (used in runs-on). Override for benchmarking. Tuned to 8 to match the other playwright workflows; bench showed flat scaling above 8."
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: "8"
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
playwright-e2e:
|
playwright-e2e:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && format('depot-ubuntu-24.04-{0}', inputs.depot_cores || '8') || 'ubuntu-latest' }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -19,13 +19,9 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
files-changed:
|
files-changed:
|
||||||
name: detect what files changed
|
name: detect what files changed
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
timeout-minutes: 3
|
timeout-minutes: 3
|
||||||
outputs:
|
outputs:
|
||||||
licenses-frontend: ${{ steps.changes.outputs.licenses-frontend }}
|
licenses-frontend: ${{ steps.changes.outputs.licenses-frontend }}
|
||||||
@@ -48,8 +44,8 @@ jobs:
|
|||||||
generate-frontend-license-report:
|
generate-frontend-license-report:
|
||||||
if: needs.files-changed.outputs.licenses-frontend == 'true'
|
if: needs.files-changed.outputs.licenses-frontend == 'true'
|
||||||
name: Generate Frontend License Report
|
name: Generate Frontend License Report
|
||||||
needs: [pick, files-changed]
|
needs: files-changed
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
@@ -321,15 +317,13 @@ jobs:
|
|||||||
|
|
||||||
generate-backend-license-report:
|
generate-backend-license-report:
|
||||||
if: needs.files-changed.outputs.licenses-backend == 'true'
|
if: needs.files-changed.outputs.licenses-backend == 'true'
|
||||||
needs: [pick, files-changed]
|
needs: files-changed
|
||||||
name: Generate Backend License Report
|
name: Generate Backend License Report
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
repository-projects: write # Required for enabling automerge
|
repository-projects: write # Required for enabling automerge
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -11,12 +11,8 @@ permissions:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
frontend-validation:
|
frontend-validation:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -36,13 +36,9 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
determine-matrix:
|
determine-matrix:
|
||||||
if: ${{ vars.CI_PROFILE != 'lite' }}
|
if: ${{ vars.CI_PROFILE != 'lite' }}
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
version: ${{ steps.versionNumber.outputs.versionNumber }}
|
version: ${{ steps.versionNumber.outputs.versionNumber }}
|
||||||
@@ -112,10 +108,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
build-jars:
|
build-jars:
|
||||||
needs: [pick, determine-matrix]
|
needs: determine-matrix
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
variant:
|
variant:
|
||||||
@@ -195,7 +189,6 @@ jobs:
|
|||||||
SM_API_KEY: ${{ secrets.SM_API_KEY }}
|
SM_API_KEY: ${{ secrets.SM_API_KEY }}
|
||||||
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
||||||
RELEASE_GPG_PRIVATE_KEY: ${{ secrets.RELEASE_GPG_PRIVATE_KEY }}
|
RELEASE_GPG_PRIVATE_KEY: ${{ secrets.RELEASE_GPG_PRIVATE_KEY }}
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
@@ -638,8 +631,8 @@ jobs:
|
|||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
collect-and-release:
|
collect-and-release:
|
||||||
needs: [pick, determine-matrix, build, build-jars]
|
needs: [determine-matrix, build, build-jars]
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -13,13 +13,9 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
playwright-all-browsers:
|
playwright-all-browsers:
|
||||||
name: Playwright (chromium + firefox + webkit)
|
name: Playwright (chromium + firefox + webkit)
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -22,15 +22,9 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
push:
|
push:
|
||||||
if: ${{ vars.CI_PROFILE != 'lite' }}
|
if: ${{ vars.CI_PROFILE != 'lite' }}
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
env:
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ jobs:
|
|||||||
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
RELEASE_GPG_PRIVATE_KEY: ${{ secrets.RELEASE_GPG_PRIVATE_KEY }}
|
RELEASE_GPG_PRIVATE_KEY: ${{ secrets.RELEASE_GPG_PRIVATE_KEY }}
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
|
|||||||
@@ -17,19 +17,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: "false"
|
default: "false"
|
||||||
depot_cores:
|
|
||||||
description: "Depot runner vCPU count (used in runs-on). Override for benchmarking."
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: "8"
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
# TODO: extract a pre-matrix `prepare` job that runs once and produces
|
# TODO: extract a pre-matrix `prepare` job that runs once and produces
|
||||||
# shared artifacts for the three matrix entries below to consume:
|
# shared artifacts for the three matrix entries below to consume:
|
||||||
# 1. `task backend:build` — currently runs 3× in parallel with
|
# 1. `task backend:build` — currently runs 3× in parallel with
|
||||||
@@ -45,14 +37,7 @@ jobs:
|
|||||||
# spring-security=true matrix entry if `task backend:build` and
|
# spring-security=true matrix entry if `task backend:build` and
|
||||||
# `task backend:build:ci` produce equivalent JARs (verify before wiring).
|
# `task backend:build:ci` produce equivalent JARs (verify before wiring).
|
||||||
test-build-docker-images:
|
test-build-docker-images:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && format('depot-ubuntu-24.04-{0}', inputs.depot_cores || '8') || 'ubuntu-latest' }}
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
env:
|
|
||||||
USE_DEPOT: ${{ needs.pick.outputs.use_depot == 'true' && inputs.docker-base-changed != 'true' }}
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -125,16 +110,10 @@ jobs:
|
|||||||
DISABLE_ADDITIONAL_FEATURES: true
|
DISABLE_ADDITIONAL_FEATURES: true
|
||||||
STIRLING_PDF_DESKTOP_UI: false
|
STIRLING_PDF_DESKTOP_UI: false
|
||||||
|
|
||||||
- name: Set up Depot CLI
|
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/setup-action@15c09a5f77a0840ad4bce955686522a257853461 # v1.0.0
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||||
|
|
||||||
@@ -182,24 +161,10 @@ jobs:
|
|||||||
--tag stirling-pdf-embedded:pr-test \
|
--tag stirling-pdf-embedded:pr-test \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Build ${{ matrix.docker-rev }} (Depot)
|
# PRs that did NOT change the base use the buildx container builder
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/build-push-action@98e78adca7817480b8185f474a400b451d74e287 # v1.16.0
|
|
||||||
with:
|
|
||||||
project: ${{ vars.DEPOT_PROJECT_ID }}
|
|
||||||
context: .
|
|
||||||
file: ./${{ matrix.docker-rev }}
|
|
||||||
push: false
|
|
||||||
platforms: ${{ steps.build-params.outputs.platforms }}
|
|
||||||
build-args: |
|
|
||||||
BASE_IMAGE=${{ steps.build-params.outputs.base_image }}
|
|
||||||
provenance: true
|
|
||||||
sbom: true
|
|
||||||
|
|
||||||
# Fork PRs that did NOT change the base use the buildx container builder
|
|
||||||
# (multi-platform + gha cache) against the published base image.
|
# (multi-platform + gha cache) against the published base image.
|
||||||
- name: Build ${{ matrix.docker-rev }} (Docker fork fallback)
|
- name: Build ${{ matrix.docker-rev }}
|
||||||
if: env.USE_DEPOT != 'true' && inputs.docker-base-changed != 'true'
|
if: inputs.docker-base-changed != 'true'
|
||||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
@@ -227,14 +192,7 @@ jobs:
|
|||||||
if-no-files-found: warn
|
if-no-files-found: warn
|
||||||
|
|
||||||
test-build-unoserver-image:
|
test-build-unoserver-image:
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && format('depot-ubuntu-24.04-{0}', inputs.depot_cores || '8') || 'ubuntu-latest' }}
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
env:
|
|
||||||
USE_DEPOT: ${{ needs.pick.outputs.use_depot == 'true' && inputs.docker-base-changed != 'true' }}
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
@@ -244,35 +202,14 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Set up Depot CLI
|
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/setup-action@15c09a5f77a0840ad4bce955686522a257853461 # v1.0.0
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||||
|
|
||||||
- name: Build docker/unoserver/Dockerfile (Depot)
|
- name: Build docker/unoserver/Dockerfile
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/build-push-action@98e78adca7817480b8185f474a400b451d74e287 # v1.16.0
|
|
||||||
with:
|
|
||||||
project: ${{ vars.DEPOT_PROJECT_ID }}
|
|
||||||
context: .
|
|
||||||
file: ./docker/unoserver/Dockerfile
|
|
||||||
push: false
|
|
||||||
load: true
|
|
||||||
platforms: linux/amd64
|
|
||||||
tags: stirling-unoserver:pr-test
|
|
||||||
provenance: false
|
|
||||||
sbom: false
|
|
||||||
|
|
||||||
- name: Build docker/unoserver/Dockerfile (Docker fork fallback)
|
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
|
|||||||
@@ -20,19 +20,9 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pick:
|
|
||||||
uses: ./.github/workflows/_runner-pick.yml
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
if: ${{ vars.CI_PROFILE != 'lite' }}
|
if: ${{ vars.CI_PROFILE != 'lite' }}
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
env:
|
|
||||||
USE_DEPOT: ${{ needs.pick.outputs.use_depot == 'true' }}
|
|
||||||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
@@ -61,12 +51,7 @@ jobs:
|
|||||||
MAVEN_PUBLIC_URL: ${{ secrets.MAVEN_PUBLIC_URL }}
|
MAVEN_PUBLIC_URL: ${{ secrets.MAVEN_PUBLIC_URL }}
|
||||||
DISABLE_ADDITIONAL_FEATURES: true
|
DISABLE_ADDITIONAL_FEATURES: true
|
||||||
|
|
||||||
- name: Set up Depot CLI
|
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/setup-action@15c09a5f77a0840ad4bce955686522a257853461 # v1.0.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||||
|
|
||||||
- name: Get version number
|
- name: Get version number
|
||||||
@@ -81,20 +66,7 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_HUB_API }}
|
password: ${{ secrets.DOCKER_HUB_API }}
|
||||||
|
|
||||||
- name: Build and push test image (Depot)
|
- name: Build and push test image
|
||||||
if: env.USE_DEPOT == 'true'
|
|
||||||
uses: depot/build-push-action@98e78adca7817480b8185f474a400b451d74e287 # v1.16.0
|
|
||||||
with:
|
|
||||||
project: ${{ vars.DEPOT_PROJECT_ID }}
|
|
||||||
context: .
|
|
||||||
file: ./docker/embedded/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/test:test-${{ github.sha }}
|
|
||||||
build-args: VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }}
|
|
||||||
platforms: linux/amd64
|
|
||||||
|
|
||||||
- name: Build and push test image (Docker fork fallback)
|
|
||||||
if: env.USE_DEPOT != 'true'
|
|
||||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@@ -153,8 +125,7 @@ jobs:
|
|||||||
files-changed:
|
files-changed:
|
||||||
if: always()
|
if: always()
|
||||||
name: detect what files changed
|
name: detect what files changed
|
||||||
needs: pick
|
runs-on: ubuntu-latest
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
|
||||||
timeout-minutes: 3
|
timeout-minutes: 3
|
||||||
outputs:
|
outputs:
|
||||||
frontend: ${{ steps.changes.outputs.frontend }}
|
frontend: ${{ steps.changes.outputs.frontend }}
|
||||||
@@ -174,8 +145,8 @@ jobs:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
if: needs.files-changed.outputs.frontend == 'true'
|
if: needs.files-changed.outputs.frontend == 'true'
|
||||||
needs: [pick, deploy, files-changed]
|
needs: [deploy, files-changed]
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
||||||
@@ -208,8 +179,8 @@ jobs:
|
|||||||
FORCE_COLOR: "3"
|
FORCE_COLOR: "3"
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
needs: [pick, deploy, test]
|
needs: [deploy, test]
|
||||||
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-latest' }}
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -23,31 +23,6 @@ plugins {
|
|||||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
|
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Depot remote build cache. Disabled repo-wide via depotCacheEnabled below;
|
|
||||||
// flip it back to true to re-enable. Even when enabled it silently no-ops
|
|
||||||
// without DEPOT_TOKEN (local dev without depot login, and fork PRs where
|
|
||||||
// GitHub hides secrets), so contributors build fine on local cache only.
|
|
||||||
buildCache {
|
|
||||||
def depotCacheEnabled = false
|
|
||||||
def depotToken = System.getenv('DEPOT_TOKEN')
|
|
||||||
local {
|
|
||||||
enabled = true
|
|
||||||
}
|
|
||||||
if (depotCacheEnabled && depotToken) {
|
|
||||||
remote(HttpBuildCache) {
|
|
||||||
url = 'https://cache.depot.dev'
|
|
||||||
enabled = true
|
|
||||||
// Only CI runs push to the shared cache; dev laptops pull-only
|
|
||||||
// so a misconfigured local task can't poison everyone else.
|
|
||||||
push = System.getenv('CI') == 'true'
|
|
||||||
credentials {
|
|
||||||
username = ''
|
|
||||||
password = depotToken
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.name = 'Stirling PDF'
|
rootProject.name = 'Stirling PDF'
|
||||||
|
|
||||||
// Flavors: core | proprietary (default) | saas.
|
// Flavors: core | proprietary (default) | saas.
|
||||||
|
|||||||
Reference in New Issue
Block a user