ci: Check generated assets are up-to-date #2694
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate | |
on: | |
pull_request: | |
concurrency: | |
group: generate-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
changes: | |
name: Check changes | |
runs-on: ubuntu-24.04 | |
outputs: | |
src: ${{ steps.changes.outputs.src}} | |
steps: | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 | |
id: changes | |
continue-on-error: true | |
with: | |
filters: | | |
src: | |
- .github/workflows/** | |
- external/** | |
- tool/** | |
- packages/dynamite/** | |
- packages/nextcloud/** | |
dart: | |
name: Dart | |
runs-on: ubuntu-24.04 | |
needs: changes | |
if: needs.changes.outputs.src != 'false' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Submodules | |
run: git submodule update --init --depth 0 | |
- name: Install dart | |
uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # v1 | |
with: | |
sdk: 3.5 | |
- name: Setup | |
run: ./tool/setup.sh | |
- name: Generate dynamite end to end test | |
run: | | |
./tool/generate-dynamite-e2e-test.sh | |
git --no-pager diff --exit-code | |
- name: Generate dynamite petstore example | |
run: | | |
./tool/generate-dynamite-petstore-example.sh | |
git --no-pager diff --exit-code | |
- name: Generate nextcloud | |
run: | | |
./tool/generate-nextcloud.sh | |
git --no-pager diff --exit-code | |
openapi: | |
name: OpenAPI | |
runs-on: ubuntu-24.04 | |
needs: changes | |
if: needs.changes.outputs.src != 'false' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Submodules | |
run: git submodule update --init --depth 0 | |
- name: Install php | |
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 | |
with: | |
php-version: "8.1" | |
tools: composer | |
# Use https://github.com/kislyuk/yq | |
- name: Install yq | |
run: pip install yq --break-system-packages | |
- name: Generate specs | |
run: | | |
./tool/generate-specs.sh | |
git --no-pager diff --exit-code | |
assets: | |
name: Assets | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Submodules | |
run: git submodule update --init --depth 0 | |
- name: Install inkscape, imagemagick, exiftool | |
run: sudo apt install -y inkscape imagemagick exiftool --no-install-recommends | |
- name: Install dart | |
uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # v1 | |
with: | |
sdk: 3.5 | |
- name: Setup | |
run: ./tool/setup.sh | |
- name: Generate assets | |
run: | | |
./tool/generate-assets.sh | |
# The changes to this file are not stable, so we have to ignore them before checking if anything else changed. | |
git checkout packages/neon_framework/example/web/index.html | |
git --no-pager diff --exit-code |