Skip to content

Commit

Permalink
Merge pull request #8 from infralovers/force-invalid-pr
Browse files Browse the repository at this point in the history
fix: Update template workflow to reusable workflow
  • Loading branch information
mabunixda authored Apr 18, 2024
2 parents 982133b + ceb80b1 commit fb18d7d
Showing 1 changed file with 3 additions and 53 deletions.
56 changes: 3 additions & 53 deletions workflow-templates/changelog-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[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@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: [email protected]
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

0 comments on commit fb18d7d

Please sign in to comment.