-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (36 loc) · 1.31 KB
/
lint-sync.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
name: lint-sync
on:
workflow_call:
permissions:
contents: write
pull-requests: write
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
cp ${{ github.repository_owner }}/meta/golangci-soft.yml ${{ github.repository }}/.golangci-soft.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
path: "${{ github.repository }}"
- 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 }}"