update failure message #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "Check VERSION" | |
on: | |
push: | |
branches: | |
- "main" | |
- "pre_commit_check" | |
pull_request_target: {} | |
env: | |
OSS_VERSION_FILE: https://raw.githubusercontent.com/determined-ai/determined/main/VERSION | |
permissions: | |
pull-requests: read | |
contents: read | |
jobs: | |
compare-versions: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get OSS Version | |
run: | | |
# read OSS version file and get the current dev version | |
export OSS_VERSION=$(curl ${{ env.OSS_VERSION_FILE }} | grep -oE '^[0-9.]*') | |
- name: Validate Environments Version | |
id: validate | |
run: | | |
# compare oss dev version with environments version | |
export ENVIRONMENTS_VERSION=$(grep -oE '^[0-9.]*' VERSION) | |
source scripts/compare-versions.sh | |
vercomp $OSS_VERSION $ENVIRONMENTS_VERSION | |
- name: Failure Message | |
if: ${{ failure() }} | |
run: | | |
echo "******** | |
This branch has an invalid VERSION file. | |
Given Version: $ENVIRONMENTS_VERSION | |
Minimum Expected Version: $OSS_VERSION | |
Please check that VERSION in your branch is up-to-date. | |
********" | |
exit 1 |