Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
spbsoluble committed Dec 6, 2023
1 parent eacec4a commit 0dec579
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/keyfactor-starter-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- 'release-*.*'

jobs:
ckech-version:
check-pkg-version:
runs-on: ubuntu-latest
outputs:
PR_BASE_REF: ${{ steps.set-outputs.outputs.PR_BASE_REF }}
Expand Down Expand Up @@ -86,6 +86,7 @@ jobs:
echo "LATEST_TAG=" | tee -a "$GITHUB_ENV"
fi
- name: Set Outputs
if: github.event_name == 'pull_request'
id: set-outputs
run: |
echo "PR_BASE_REF=${{ env.PR_BASE_REF }}" | tee -a "$GITHUB_OUTPUT"
Expand All @@ -109,7 +110,7 @@ jobs:
echo "LATEST_TAG=${{ env.LATEST_TAG }}" | tee -a "$GITHUB_OUTPUT"
- name: Compare package version
id: compare-version
id: check-version
run: |
if [ "${{ github.event_name }}" == "push" ]; then
if [ "${{ steps.get-version.outputs.version }}" != "${{ env.VERSION }}" ]; then
Expand All @@ -126,12 +127,20 @@ jobs:
else
echo "Skipping version check for events other than push."
fi
- name: Set new version
if: steps.check-version.outcome == 'success'
run: |
echo "Setting new version in version.go"
sed -i "s/const VERSION = .*/const VERSION = \"${{ env.VERSION }}\"/" version/version.go
git add version/version.go
git commit -m "Set version to ${{ env.VERSION }}"
git push
call-starter-workflow:
uses: keyfactor/actions/.github/workflows/starter.yml@v2
secrets:
token: ${{ secrets.V2BUILDTOKEN}}
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
# call-starter-workflow:
# uses: keyfactor/actions/.github/workflows/starter.yml@v2
# secrets:
# token: ${{ secrets.V2BUILDTOKEN}}
# APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
# gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
# gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}

0 comments on commit 0dec579

Please sign in to comment.