- Workflow callers: - grant `contents: read` and `checks: write` when invoking the reusable test suite from CI validation, nightly builds, and main release automation - align caller permissions with the nested `backend-tests` and `frontend-tests` jobs so GitHub accepts the workflow graph - Validation: - keep workflow YAML parsing clean after the permission wiring change - keep `git diff --check` clean for the touched workflow files
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
name: CI - Validate
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
- main
|
|
push:
|
|
branches:
|
|
- develop
|
|
|
|
jobs:
|
|
migration-check:
|
|
name: Flyway Migration Check
|
|
if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
|
|
uses: ./.github/workflows/migrations-check.yml
|
|
with:
|
|
base_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
|
|
head_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
|
checkout_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
|
|
|
test-suite:
|
|
name: Test Suite
|
|
if: ${{ (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')) && (needs.migration-check.result == 'success' || needs.migration-check.result == 'skipped') }}
|
|
needs: [migration-check]
|
|
uses: ./.github/workflows/test-suite.yml
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
with:
|
|
checkout_ref: ${{ github.sha }}
|
|
|
|
packaging-smoke-test:
|
|
name: Packaging Smoke Test
|
|
if: ${{ (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')) && needs.test-suite.result == 'success' }}
|
|
needs: [migration-check, test-suite]
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
|
|
- name: Set Up QEMU for Multi-Arch Builds
|
|
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
|
|
|
|
- name: Set Up Docker Buildx
|
|
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
|
|
|
|
- name: Build Runtime Image
|
|
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
|
|
with:
|
|
context: .
|
|
file: Dockerfile
|
|
platforms: linux/amd64
|
|
push: false
|
|
build-args: |
|
|
APP_VERSION=ci-${{ github.sha }}
|
|
APP_REVISION=${{ github.sha }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|