Skip to content

fix: update pre-commit and fixxes of findings #24

fix: update pre-commit and fixxes of findings

fix: update pre-commit and fixxes of findings #24

name: Infralovers Changelog Automation
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:
jobs:
prebuild:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.semrel.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Check pre-commit presence
id: precommit_exists
uses: andstor/file-existence-action@v1
with:
files: ".pre-commit-config.yaml"
- uses: actions/setup-python@v5
if: steps.precommit_exists.outputs.files_exists == 'true'
- uses: pre-commit/[email protected]
if: steps.precommit_exists.outputs.files_exists == 'true'
- uses: go-semantic-release/action@v1
if: github.event_name != 'pull_request'
id: semrel
with:
github-token: ${{ secrets.BOT_ACCESS_TOKEN }}
prepend: true
dry: true
release:
needs: [ prebuild ]
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }} # needed for push to protected branch
- uses: go-semantic-release/action@v1
if: needs.prebuild.outputs.version != ''
id: generate_changelog
with:
github-token: ${{ secrets.BOT_ACCESS_TOKEN }}
prepend: true
changelog-file: CHANGELOG.md
- name: Update changelog
uses: stefanzweifel/git-auto-commit-action@v5
if: steps.generate_changelog.outputs.version != ''
with:
commit_user_name: infralovers-machine
commit_user_email: [email protected]
commit_message: 'chore(ci): commit changes from go-semantic-release'
file_pattern: CHANGELOG.md