From ceb80b1b36b04ef2126e8bdbe27334b57b9260cb Mon Sep 17 00:00:00 2001 From: Martin Buchleitner Date: Thu, 18 Apr 2024 08:29:08 +0200 Subject: [PATCH] fix: update template workflow to reuse workflow Signed-off-by: Martin Buchleitner --- workflow-templates/changelog-automation.yml | 56 ++------------------- 1 file changed, 3 insertions(+), 53 deletions(-) diff --git a/workflow-templates/changelog-automation.yml b/workflow-templates/changelog-automation.yml index 10b9fd1..e79fd3e 100644 --- a/workflow-templates/changelog-automation.yml +++ b/workflow-templates/changelog-automation.yml @@ -7,56 +7,6 @@ on: branches: [ $default-branch ] jobs: - prebuild: - runs-on: ubuntu-latest - outputs: - version: ${{ steps.semrel.outputs.version }} - steps: - - uses: actions/checkout@v3 - - - name: Check pre-commit presence - id: precommit_exists - uses: andstor/file-existence-action@v1 - with: - files: ".pre-commit-config.yaml" - - - uses: actions/setup-python@v3 - if: steps.precommit_exists.outputs.files_exists == 'true' - - - uses: pre-commit/action@v3.0.0 - 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@v2 - 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@v4 - if: steps.generate_changelog.outputs.version != '' - with: - commit_user_name: infralovers-machine - commit_user_email: il-machine@infralovers.com - commit_message: 'chore(ci): commit changes from go-semantic-release' - file_pattern: CHANGELOG.md + changelog-automation: + uses: infralovers/.github/.github/workflows/changelog-automation.yml@main + secrets: inherit