ci: updated workflows to use new centralized logic

This commit is contained in:
Ceferino Patino 2025-02-15 14:03:26 -06:00
commit 68272c125e
Signed by: c4patino
SSH key fingerprint: SHA256:9fQ9TsujGrdNNi76mnsu63v7dS5JOmHRZEqBOl49OR8
2 changed files with 20 additions and 32 deletions

20
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: gofmt
on:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
types: [opened, reopened, synchronize]
branches: ["*"]
workflow_dispatch:
permissions:
contents: write
jobs:
format:
uses: c4patino/actions/.github/workflows/format.yml@main
with:
language: go
directory: ./2024

View file

@ -1,32 +0,0 @@
name: gofmt
on:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
types: [opened, reopened, synchronize]
branches: ["*"]
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup go
uses: actions/setup-go@v5
- name: Format all go files
run: (cd ./2024/ && go fmt ./...)
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5.0.1
with:
commit_message: |
Autoformatting with gofmt
[skip ci]