Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format workflow: check before committing #382

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Go Format

on:
push:
branches:
- 'sdk-automation/models'
push:
branches:
- 'sdk-automation/models'

jobs:
format:
if: ${{ ! startsWith(github.event.head_commit.message, 'style(fmt)') }}
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version: 1.18
- run: make fmt
- run: |
git config user.name AdyenAutomationBot
git config user.email "${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}"
git add .
git commit -m "style(fmt): code formatted"
git push
format:
if: ${{ github.event.commits!= null && github.event.commits.length > 0 &&!startsWith(github.event.head_commit.message, 'style(fmt)') }}
gcatanese marked this conversation as resolved.
Show resolved Hide resolved
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version: 1.18
- run: make fmt
- run: |
git config user.name AdyenAutomationBot
git config user.email "${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}"
git add.
gcatanese marked this conversation as resolved.
Show resolved Hide resolved
git commit -m "style(fmt): code formatted"
git push