Skip to content

Fix BOM stripping in log parser to apply to all lines (#2773) #324

Fix BOM stripping in log parser to apply to all lines (#2773)

Fix BOM stripping in log parser to apply to all lines (#2773) #324

name: Autoversion Main
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
pull_request:
types: [ closed ]
jobs:
bump:
if: ${{ !github.event.repository.fork }}
runs-on: ubuntu-slim
permissions:
contents: none
actions: read
steps:
- uses: plengauer/opentelemetry-github/actions/instrument/job@v5.38.2
with:
secrets_to_redact: '["${{ github.token }}","${{ secrets.ACTIONS_GITHUB_TOKEN }}","${{ secrets.OPENAI_TOKEN }}"]'
env:
OTEL_EXPORTER_OTLP_ENDPOINT: '${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }}'
OTEL_EXPORTER_OTLP_HEADERS: '${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}'
- id: should-autoversion
run: |
case "$GITHUB_EVENT_NAME" in
pull_request) cat "$GITHUB_EVENT_PATH" | jq .pull_request.base.ref -r | grep -q '^main$' && cat "$GITHUB_EVENT_PATH" | jq .pull_request.number -r | xargs -I '{}' curl ${GITHUB_API_URL:-https://api.github.com}/repos/"$GITHUB_REPOSITORY"/issues/'{}'/comments'?per_page=100' | jq '.[] | select(.body == "!release") | .author_association' -r | grep -q OWNER && echo true || echo false;;
*) echo true;;
esac | xargs -I '{}' echo result='{}' >> "$GITHUB_OUTPUT"
- uses: plengauer/autoversion@v2.2.0
if: ${{ steps.should-autoversion.outputs.result == 'true' }}
with:
github_token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
openai_token: ${{ secrets.OPENAI_TOKEN }}
path_include: ./meta:./src:./actions
increment_threshold: minor