Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
airkei committed Jan 24, 2025
1 parent 942e538 commit 87864e6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/actions/build_patches/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ runs:
steps:
- name: set self version as environment variable
shell: bash
# if the version is "v1.2.3", set MAJOR=1, MINOR=2, PATCH=3
# if the version is "v1.2", set MAJOR=1, MINOR=2, PATCH=0
run: |
OTACLIENT_VERSION=${{ inputs.version }}
echo "MAJOR=$(echo ${OTACLIENT_VERSION} | cut -d. -f1)" >> $GITHUB_ENV
echo "MINOR=$(echo ${OTACLIENT_VERSION} | cut -d. -f2)" >> $GITHUB_ENV
# echo "PATCH=$(echo ${OTACLIENT_VERSION} | cut -d. -f3)" >> $GITHUB_ENV
echo "MAJOR=$(echo ${OTACLIENT_VERSION} | cut -d. -f1 || echo 0)" >> $GITHUB_ENV
echo "MINOR=$(echo ${OTACLIENT_VERSION} | cut -d. -f2 || echo 0)" >> $GITHUB_ENV
echo "PATCH=$(echo ${OTACLIENT_VERSION} | cut -d. -f3 || echo 0)" >> $GITHUB_ENV
- name: get released versions
shell: bash
run: |
RELEASES=$(curl -s https://api.github.com/repos/tier4/ota-client/releases)
echo "RELEASES=${RELEASES}" >> $GITHUB_ENV
VERSIONS=$(echo ${RELEASES} | jq -r '.[].name' | grep -oE '^v[0-9]+\.[0-9]+\.[0-9]+$' | sed 's/^v//')
echo "VERSIONS=${VERSIONS}" >> $GITHUB_ENV
Expand Down

0 comments on commit 87864e6

Please sign in to comment.