ci: trigger workflow on PR with build-only validation
Some checks failed
CI / Deploy (pull_request) Has been skipped
PR → Build → WiFi/USB Deploy → LGTM / Build & Deploy to iPhone (WiFi/USB) (pull_request) Failing after 2m37s
PR → Build → WiFi/USB Deploy → LGTM / Wait for LGTM comment (pull_request) Has been skipped
Admin Web Docker / Docker Build Validation (pull_request) Failing after 28s
Admin Web Docker / Semantic Release (pull_request) Has been skipped
CI / Detect Changes (pull_request) Successful in 4s
Admin Web Docker / Build & Push Docker Image (pull_request) Has been skipped
CI / Admin Web CI (pull_request) Failing after 38s
CI / YouTube Worker (pull_request) Has been skipped

This commit is contained in:
Millian Lamiaux
2026-07-12 22:50:35 +02:00
parent cb86bf55b3
commit 3dd044029e
2 changed files with 167 additions and 6 deletions

View File

@@ -3,6 +3,10 @@ name: Admin Web Docker
on:
push:
branches: [main]
pull_request:
paths:
- 'admin-web/**'
- '.github/workflows/admin-web-docker.yml'
workflow_dispatch:
concurrency:
@@ -13,15 +17,46 @@ env:
NODE_VERSION: "22"
jobs:
build-validation:
name: Docker Build Validation
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Install Docker CLI
run: sudo apt-get update -qq && sudo apt-get install -y -qq docker.io
- name: Build admin-web image (no push)
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ vars.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ vars.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
run: |
set -e
docker build \
--file admin-web/Dockerfile \
--build-arg "NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL}" \
--build-arg "NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY}" \
--tag "tabatago-admin-web:pr-validation" \
admin-web
semantic-release:
name: Semantic Release
runs-on: ubuntu-latest
timeout-minutes: 10
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name != 'pull_request' &&
(
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[ci skip]')
github.event_name == 'workflow_dispatch' ||
(
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[ci skip]')
)
)
outputs:
released: ${{ steps.release.outputs.released }}