Skip to content

Commit

Permalink
feat(ci): sync golangci-lint config workflow
Browse files Browse the repository at this point in the history
Automate copying the golangci-lint config from the meta repository to
other repositories.
  • Loading branch information
aymanbagabas committed Oct 24, 2024
1 parent 092a973 commit c333b62
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/lint-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: lint-sync
on:
workflow_call:

permissions: write-all

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ${{ github.repository }}
- uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/meta
path: ${{ github.repository_owner }}/meta
- run: |
cp ${{ github.repository_owner }}/meta/golangci.yml ${{ github.repository }}/.golangci.yml
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore(ci): sync golangci-lint config"
title: "Sync golangci-lint config"
body: |
This is an automated pull request to sync the golangci-lint config with the meta repository.
branch: "ci/sync-lint-config"
delete-branch: true
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 comments on commit c333b62

Please sign in to comment.