add newline #16
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 Determined OSS Version | |
run: | | |
# read determined OSS version file and get the current dev version | |
export OSS_VERSION="$(curl ${{ env.OSS_VERSION_FILE }} | grep -oE '^[0-9.]*')" | |
echo "OSS_VERSION=$OSS_VERSION" >> ${{ github.env }} | |
- name: Get Environments Version | |
run: | | |
# read environments version file | |
export ENVIRONMENTS_VERSION="$(grep -oE '^[0-9.]*' VERSION)" | |
echo "ENVIRONMENTS_VERSION=$ENVIRONMENTS_VERSION" >> ${{ github.env }} | |
- name: Validate Environments Version | |
id: validate | |
run: | | |
# compare oss dev version with environments version | |
source scripts/compare-versions.sh | |
export RESULT="$(vercomp $OSS_VERSION $ENVIRONMENTS_VERSION)" | |
if [ $RESULT -eq 1 ] | |
then | |
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 | |
fi |