Skip to content

Commit

Permalink
adjusting automated versioning
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff <[email protected]>
  • Loading branch information
jnull committed May 19, 2024
1 parent 18eebc3 commit af013db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout Repo
uses: actions/checkout@v4
- name: Get current Version
id: version
run: |
if [[ "${{ github.ref_type }}" = "tag" ]]; then
echo "version=$(echo ${{ github.ref }} | sed "s/^.*\/v//g")" >> $GITHUB_OUTPUT
else
echo "Ref Type not tag: ${{github.ref_type}}"
echo "latest" >> $GITHUB_OUTPUT
fi
- name: shellcheck
run: shellcheck telegraf/run.sh
- name: Login to GitHub Container Registry
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/copy-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ jobs:
id: version
run: |
if [[ "${{ github.ref_type }}" = "tag" ]]; then
TAG=${{ github.ref }}
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
echo "version=$(echo ${{ github.ref }} | sed "s/^.*\/v//g")" >> $GITHUB_OUTPUT
else
echo "Ref Type not tag: ${{github.ref_type}}"
echo "latest" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit af013db

Please sign in to comment.