-
Notifications
You must be signed in to change notification settings - Fork 30
42 lines (35 loc) · 1.28 KB
/
format.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Go Format
on:
push:
branches:
- 'sdk-automation/models'
jobs:
format:
if: ${{ github.event.commits != null && !startsWith(github.event.head_commit.message, 'style(fmt)') }}
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
- name: Log Commit Details
run: |
echo "github.event.size: ${{ github.event.size }}"
echo "github.event.commits: ${{ github.event.commits }}"
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: Format Code
run: make fmt
- name: Configure Git
run: |
git config user.name AdyenAutomationBot
git config user.email "${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}"
- name: Commit and Push Changes
run: |
git add .
git commit -m "style(fmt): code formatted"
git push