Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Masgalor authored Aug 21, 2024
1 parent b2a00c7 commit 4e2fc0b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/actions/repo-state/action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: 'Repository state'
description: 'Get the latest tag, latest process-note and commits since last tag.'
description: 'Get the latest tag, the latest process-note, the number of commits since the last tag and the version numbers from the last tag.'
outputs:
tag:
description: "Latest tagged version"
description: "Last tagged version"
value: ${{ steps.tag.outputs.value }}
note:
description: "Note on the latest commit"
description: "Note on the last tag"
value: ${{ steps.note.outputs.value }}
commits:
description: "Number of commits since last tag"
description: "Number of commits since the last tag"
value: ${{ steps.commits.outputs.value }}
version_major:
description: "Major version number"
Expand All @@ -26,23 +26,23 @@ runs:
with:
fetch-depth: 0
ref: 'master'
- name: "Get latest tag"
- name: Get the last release-tag
id: tag
shell: bash
run: echo "value=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
- name: "Get note on the latest commit"
- name: Get the note on the last release-tag
id: note
shell: bash
run: |
git fetch origin refs/notes/*:refs/notes/*
echo 'value<<EOF' >> $GITHUB_OUTPUT
(git notes show $(git describe --tags --abbrev=0) | cat || true) >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: "Get commits since latest tag"
- name: Get the commits since the last tag
id: commits
shell: bash
run: echo "value=$(git rev-list --count $(git describe --tags --abbrev=0)..HEAD)" >> $GITHUB_OUTPUT
- name: "Get version numbers"
- name: Get the version numbers
id: version
shell: bash
run: |
Expand Down

0 comments on commit 4e2fc0b

Please sign in to comment.