Check if Dawn is up to date #18
This file contains hidden or 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
| # Copyright 2025 Adobe | |
| # All Rights Reserved. | |
| # | |
| # NOTICE: Adobe permits you to use, modify, and distribute this file in | |
| # accordance with the terms of the Adobe license agreement accompanying | |
| # it. | |
| name: Check if Dawn is up to date | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| channel: | |
| description: "Chromium channel for Dawn" | |
| required: false | |
| default: "canary" | |
| type: choice | |
| options: | |
| - stable | |
| - beta | |
| - canary | |
| workflow_call: | |
| inputs: | |
| channel: | |
| description: "Chromium channel for Dawn (stable, beta, canary)" | |
| required: true | |
| type: string | |
| jobs: | |
| get-dawn-info: | |
| uses: ./.github/workflows/dawn-info.yaml | |
| with: | |
| channel: ${{ inputs.channel }} | |
| check-dawn: | |
| needs: get-dawn-info | |
| runs-on: ubuntu-latest | |
| outputs: | |
| needs_build: ${{ steps.release_check.outputs.needs_build }} | |
| channel: ${{ needs.get-dawn-info.outputs.chromium_channel }} | |
| config: ${{ needs.get-dawn-info.outputs.chromium_dawn_suffix }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| cd Dawn | |
| pip install -r requirements.txt | |
| - name: Run Dawn build if necessary | |
| id: release_check | |
| run: | | |
| if gh release view "${{ needs.get-dawn-info.outputs.tag }}" >/dev/null 2>&1; then | |
| echo "Release '"${{ needs.get-dawn-info.outputs.tag }}"' already exists. Skipping build." | |
| echo "needs_build=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Starting build for release: ${{ needs.get-dawn-info.outputs.tag }}" | |
| echo "needs_build=true" >> $GITHUB_OUTPUT | |
| fi | |
| build-dawn: | |
| if: ${{ needs.check-dawn.outputs.needs_build == 'true' }} | |
| needs: check-dawn | |
| uses: ./.github/workflows/dawn-build-release.yaml | |
| with: | |
| channel: ${{ needs.check-dawn.outputs.channel }} |