vault/.github/workflows/verify_changes.yml
Hamid Ghaf 3443ff1cc1
use verify changes for docs to skip tests (#21620)
* use verify changes for docs to skip tests

* add verify-changes to the needed jobs

* skip go tests for doc/ui only changes

* fix a job ref

* change names, remove script

* remove ui conditions

* separate flags

* feedback
2023-07-11 09:06:48 -07:00

33 lines
1.2 KiB
YAML

name: verify_changes
on:
workflow_call:
outputs:
is_docs_change:
description: "determines if the changes contains docs"
value: ${{ jobs.verify-doc-ui-changes.outputs.is_docs_change }}
is_ui_change:
description: "determines if the changes contain ui"
value: ${{ jobs.verify-doc-ui-changes.outputs.is_ui_change }}
jobs:
# verify-doc-ui-changes determines if the changes are only for docs (website) and/or ui
verify-doc-ui-changes:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
outputs:
is_docs_change: ${{ steps.get-changeddir.outputs.is_docs_change }}
is_ui_change: ${{ steps.get-changeddir.outputs.is_ui_change }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 # Use fetch depth 0 for comparing changes to base branch
- name: Get changed directories
id: get-changeddir
env:
TYPE: ${{ github.event_name }}
REF_NAME: ${{ github.ref_name }}
BASE: ${{ github.base_ref }}
run: ./.github/scripts/verify_changes.sh ${{ env.TYPE }} ${{ env.REF_NAME }} ${{ env.BASE }}