Skip to content

Test vale workflow changes per PR #1196 #142

Test vale workflow changes per PR #1196

Test vale workflow changes per PR #1196 #142

Workflow file for this run

name: Style check
on: [pull_request]
jobs:
vale-lint:
name: runner / vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# ref: ${{ github.event.pull_request.head.sha }}
# ref: ${{ github.head_ref }}
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
submodules: true
- run: |
echo "test"
git status
echo "spam 1"
git branch -a
echo "spam 2 "
echo ${{ github.base_ref }}
echo ${{ github.head_ref }}
echo ${{ github.event.pull_request.head }}
echo ${{ github.event.pull_request.base }}
git merge-base remotes/origin/${{ github.head_ref }} remotes/origin/main
echo "MERGE_BASE=$(git merge-base remotes/origin/${{ github.head_ref }} remotes/origin/main)" >> $GITHUB_ENV
echo ${{env.MB}}
- name: Get all changed markdown files
id: changed-markdown-files
uses: tj-actions/changed-files@v42
with:
# Avoid using single or double quotes for multiline patterns
files: |
docs/**
versioned_docs/**
separator: ","
base_sha: ${{env.MERGE_BASE}}
# since_last_remote_commit: 'true'
env:
ALL_CHANGED_FILES: ${{ 0 }}
- name: No files changed?
if: steps.changed-markdown-files.outputs.any_changed == 'false'
run: |
echo "No files changed"
echo "ALL_CHANGED_FILES=$ALL_CHANGED_FILES" >> $GITHUB_ENV
- name: List all changed files markdown files
if: steps.changed-markdown-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
ALL_CHANGED_FILES_COUNT: ${{ steps.changed-markdown-files.outputs.all_changed_files_count }}
SHA: ${{ github.head_ref }}
HEAD: ${{ github.base_ref }}
run: |
echo ${ALL_CHANGED_FILES_COUNT}
echo ${ALL_CHANGED_FILES}
echo "ALL_CHANGED_FILES=$ALL_CHANGED_FILES" >> $GITHUB_ENV
echo ${SHA}
echo ${HEAD}
- uses: errata-ai/[email protected]
if: steps.changed-markdown-files.outputs.any_changed == 'true'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
separator: ", "
files: ${{env.ALL_CHANGED_FILES}}