Skip to content

Commit

Permalink
NEW Create action
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed May 31, 2022
1 parent bb9bcb8 commit b5aad7e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ runs:
- name: Checkout code
if: ${{ inputs.release == 'false' }}
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # @v2
with:
fetch-depth: 50

- name: Create tag
if: ${{ inputs.release == 'false' }}
Expand All @@ -93,11 +95,7 @@ runs:
# Use raw git commands, otherwise we get "Resource not accessible by integration"
# and the tag is not created, even if parent job is run with permission: write-all
# This is despite the fact we can create a release via the API which generates a tag
RES=$(git checkout "$SHA")
if [[ $RES =~ error ]]; then
echo "SHA does not exist, did not create tag"
exit 1
fi
git checkout "$SHA"
git tag "$TAG"
git push origin "$TAG"
echo "New tag $TAG created for sha $SHA"
Expand Down

0 comments on commit b5aad7e

Please sign in to comment.