Skip to content

Commit

Permalink
found bug in get-current-version
Browse files Browse the repository at this point in the history
  • Loading branch information
Hammerbeck committed May 23, 2024
1 parent 2ecccc3 commit b369c75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .github/actions/get-current-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Get the current version from a file and the git short sha"
outputs:
version:
description: "Version"
value: ${{ steps.get-current-version.outputs.version }}
value: ${{ steps.set-current-version.outputs.version }}
gitShortSha:
description: "Git short sha"
value: ${{ steps.set-git-short-sha.outputs.gitShortSha }}
Expand All @@ -28,9 +28,8 @@ runs:
id: set-git-short-sha
shell: bash
run: echo "gitShortSha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Set image tag
id: set-image-tag
shell: bash
run: echo "imageTag=$(cat version.txt)-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

14 changes: 7 additions & 7 deletions .github/actions/release-to-git/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@ runs:
id: get-version
uses: ./.github/actions/get-current-version

- name: output values
shell: bash
run: |
echo "version= $(cat version.txt)"
echo "latest_tag=$(git tag | sort --version-sort | tail -n1)"
- name: set latest tag
shell: bash

id: set-latest-tag
run: |
- echo "latest_tag=$(git tag | sort --version-sort | tail -n1)" >> $GITHUB_OUTPUT
- name: output values
shell: bash
run: |
echo "version= $(cat version.txt)"
echo "latest_tag=$(git tag | sort --version-sort | tail -n1)"
- name: Create release
shell: bash
if: ${{ !(steps.set-latest-tag.outputs.latest_tag == steps.get-version.outputs.version) }}
Expand All @@ -37,6 +38,5 @@ runs:
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="v${{steps.get-version.outputs.version}}" \
--generate-notes

0 comments on commit b369c75

Please sign in to comment.