diff --git a/.forgejo/workflows/actions.yaml b/.forgejo/workflows/actions.yaml index 388375c..6a528c2 100644 --- a/.forgejo/workflows/actions.yaml +++ b/.forgejo/workflows/actions.yaml @@ -123,36 +123,39 @@ jobs: - name: Extract commit message id: extract_commit_message - run: echo "::set-output name=message::$(git log --format=%B -n 1 $GITHUB_SHA)" + run: | + COMMIT_MESSAGE=$(git log --format=%B -n 1 $GITHUB_SHA) + ESCAPED_COMMIT_MESSAGE="${COMMIT_MESSAGE@Q}" + echo "message=$ESCAPED_COMMIT_MESSAGE" >> $GITHUB_OUTPUT - name: Check commit message id: check_commit_message shell: bash run: | COMMIT_MESSAGE="${{ steps.extract_commit_message.outputs.message }}" - OUTPUT="$(python .forgejo/workflows/scripts/message.py "${ESCAPED_COMMIT_MESSAGE@Q}")" + OUTPUT="$(python .forgejo/workflows/scripts/message.py "${COMMIT_MESSAGE@Q}")" if [ "$OUTPUT" = "Usage: python message.py " ]; then echo "Called without commit message!" exit 1 elif [ "$OUTPUT" = "None" ]; then echo "No version bump." - echo "::set-output name=latest_tag::$(git describe --tags --abbrev=0)" + echo "latest_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT else echo "Version bump detected: $OUTPUT" - echo "::set-output name=version::$OUTPUT" + echo "version=$OUTPUT" >> $GITHUB_OUTPUT fi - name: Create tag - if: steps.check_commit_message.outputs.version + if: steps.check_commit_message.outputs.version != '' run: | VERSION=${{ steps.check_commit_message.outputs.version }} git tag -s $VERSION -m "version bumped to $VERSION" git push origin $VERSION - name: Update latest tag - if: steps.check_commit_message.outputs.latest_tag + if: steps.check_commit_message.outputs.latest_tag != '' run: | - COMMIT_MESSAGE="$(echo "${{ steps.extract_commit_message.outputs.message }}")" + COMMIT_MESSAGE="$(steps.extract_commit_message.outputs.message)" LATEST_TAG="${{ steps.check_commit_message.outputs.latest_tag }}" git tag -fs $LATEST_TAG -m "$COMMIT_MESSAGE" git push origin $LATEST_TAG --force