ci: allow usage of cache from main branch in PR (#131) #640
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
# SPDX-FileCopyrightText: 2024 grow platform GmbH | |
# | |
# SPDX-License-Identifier: MIT | |
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
- "build-core-image" | |
pull_request: | |
branches: | |
- "main" | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
attestations: write | |
pull-requests: write | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-onyx: | |
uses: ./.github/workflows/build-onyx.yml | |
secrets: inherit | |
build-typescript-apps: | |
uses: ./.github/workflows/build-typescript-apps.yml | |
secrets: inherit | |
build-python-apps: | |
uses: ./.github/workflows/build-python-apps.yml | |
secrets: inherit | |
build-ui: | |
uses: ./.github/workflows/build-ui.yml | |
secrets: inherit | |
build-backend: | |
uses: ./.github/workflows/build-backend.yml | |
secrets: inherit | |
build-backend-docker-image: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
needs: | |
- build-backend | |
uses: ./.github/workflows/build-backend-docker-image.yml | |
build-ui-docker-image: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
needs: | |
- build-ui | |
uses: ./.github/workflows/build-ui-docker-image.yml | |
build-core-docker-image: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
needs: | |
- build-onyx | |
- build-typescript-apps | |
- build-python-apps | |
uses: ./.github/workflows/build-core-docker-image.yml | |
secrets: inherit |