Skip to content

Alert users about incomplete release PRs #1

Alert users about incomplete release PRs

Alert users about incomplete release PRs #1

name: Validate Release

Check failure on line 1 in .github/workflows/validate-release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/validate-release.yml

Invalid workflow file

(Line: 7, Col: 9): Required property is missing: type
on:
workflow_call:
inputs:
valid-release-title-patterns:
description: "Validate that the name of the release commit or PR starts with a string in this comma-separated list. Use '[version]' to refer to the current release version."
required: false
jobs:
validate-release:
runs-on: ubuntu-latest
outputs:
RELEASE_VALIDATION_RESULT: ${{ steps.validate-release.outputs.RELEASE_VALIDATION_RESULT }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
# We need the latest commit and one before it so we can compare them
fetch-depth: 2
- name: Validate release
id: validate-release
run: |
case "$GITHUB_EVENT_NAME" in
push)
yarn ts-node scripts/validate-release.ts "$GITHUB_EVENT_NAME" "$GITHUB_EVENT_BEFORE" "$GITHUB_SHA" "$GITHUB_EVENT_HEAD_COMMIT_MESSAGE" "$VALID_RELEASE_TITLE_PATTERNS"
;;
pull_request)
yarn ts-node scripts/validate-release.ts "$GITHUB_EVENT_NAME" "$GITHUB_BASE_REF" "$GITHUB_SHA" "$GITHUB_EVENT_PULL_REQUEST_TITLE" "$VALID_RELEASE_TITLE_PATTERNS"
;;
*)
echo "Unknown GitHub event name: $GITHUB_EVENT_NAME"
exit 1
esac
shell: bash
env:
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
GITHUB_EVENT_HEAD_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
GITHUB_EVENT_PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }}
VALID_RELEASE_TITLE_PATTERNS: ${{ inputs.valid-release-title-patterns }}