Skip to content

[release-24.0] ci: fall back to GitHub-hosted runners on forks (#20165) #41100

[release-24.0] ci: fall back to GitHub-hosted runners on forks (#20165)

[release-24.0] ci: fall back to GitHub-hosted runners on forks (#20165) #41100

name: check_make_vtadmin_web_proto
on:
push:
branches:
- "main"
- "release-[0-9]+.[0-9]"
tags: '**'
pull_request:
branches: '**'
permissions: read-all
jobs:
build:
name: Check Make VTAdmin Web Proto
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- name: Skip CI
run: |
if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then
echo "skipping CI due to the 'Skip CI' label"
exit 1
fi
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: 'false'
- name: Tune the OS
uses: ./.github/actions/tune-os
- name: Check for changes in relevant files
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: changes
with:
token: ''
filters: |
proto_changes:
- 'bootstrap.sh'
- 'tools/**'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'Makefile'
- 'go/vt/proto/**'
- 'proto/*.proto'
- 'web/vtadmin/src/proto/**'
- '.github/workflows/check_make_vtadmin_web_proto.yml'
- 'web/vtadmin/package.json'
- 'web/vtadmin/package-lock.json'
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
if: steps.changes.outputs.proto_changes == 'true'
with:
go-version-file: go.mod
cache: ${{ (github.base_ref == 'main' || (github.base_ref == '' && github.ref_name == 'main')) && 'true' || 'false' }}
- name: Setup Node
if: steps.changes.outputs.proto_changes == 'true'
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
# node-version should match package.json
node-version: '22.13.1'
- name: Install npm dependencies
if: steps.changes.outputs.proto_changes == 'true'
run: npm ci
working-directory: ./web/vtadmin
- name: check_make_vtadmin_web_proto
if: steps.changes.outputs.proto_changes == 'true'
run: |
tools/check_make_vtadmin_web_proto.sh