From 68272c125e120c485065c20d7afe5933030b10da Mon Sep 17 00:00:00 2001 From: C4 Patino Date: Sat, 15 Feb 2025 14:03:26 -0600 Subject: [PATCH] ci: updated workflows to use new centralized logic --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ .github/workflows/format.yml | 32 -------------------------------- 2 files changed, 20 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c8a3979 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index 34d59b2..0000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -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]