blob: 85a2b895d2db05a36b8ec3d639c9b6ebec2f8419 [file] [log] [blame] [edit]
name: CI
on:
pull_request:
push:
branches:
- trunk
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
name: Check Targets
if: >
github.event.repository.fork == false &&
(startsWith(github.head_ref, 'renovate/') != true || github.event_name == 'workflow_call')
uses: ./.github/workflows/bazel.yml
with:
name: Check Targets
run: COMMIT_RANGE="${{ github.event.pull_request.base.sha || github.event.before }}...${{ github.event.pull_request.head.sha || github.sha }}" ./scripts/github-actions/check-bazel-targets.sh
fetch-depth: 50
artifact-name: check-targets
artifact-path: bazel-targets.txt
read-targets:
name: Read Targets
needs: check
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.read.outputs.targets }}
steps:
- name: Download targets
uses: actions/download-artifact@v4
with:
name: check-targets
- name: Read targets
id: read
run: |
if [ -s bazel-targets.txt ]; then
{
echo "targets<<EOF"
cat bazel-targets.txt
echo "EOF"
} >> "$GITHUB_OUTPUT"
else
echo "targets=" >> "$GITHUB_OUTPUT"
fi
dotnet:
name: .NET
needs: read-targets
uses: ./.github/workflows/ci-dotnet.yml
if: >
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_call' ||
contains(needs.read-targets.outputs.targets, '//dotnet') ||
contains(join(github.event.commits.*.message), '[dotnet]') ||
contains(github.event.pull_request.title, '[dotnet]')
java:
name: Java
needs: read-targets
uses: ./.github/workflows/ci-java.yml
if: >
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_call' ||
contains(needs.read-targets.outputs.targets, '//java') ||
contains(join(github.event.commits.*.message), '[java]') ||
contains(github.event.pull_request.title, '[java]')
python:
name: Python
needs: read-targets
uses: ./.github/workflows/ci-python.yml
if: >
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_call' ||
contains(needs.read-targets.outputs.targets, '//py') ||
contains(join(github.event.commits.*.message), '[py]') ||
contains(github.event.pull_request.title, '[py]')
ruby:
name: Ruby
needs: read-targets
uses: ./.github/workflows/ci-ruby.yml
if: >
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_call' ||
contains(needs.read-targets.outputs.targets, '//rb') ||
contains(join(github.event.commits.*.message), '[rb]') ||
contains(github.event.pull_request.title, '[rb]')
rust:
name: Rust
needs: read-targets
uses: ./.github/workflows/ci-rust.yml
secrets:
SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}
if: >
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_call' ||
contains(needs.read-targets.outputs.targets, '//rust') ||
contains(join(github.event.commits.*.message), '[rust]') ||
contains(github.event.pull_request.title, '[rust]')