-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1013 Bytes
/
pre-commit.yml
File metadata and controls
34 lines (30 loc) · 1013 Bytes
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
name: pre-commit
on: [push]
jobs:
pre-commit:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6.0.0
with:
go-version-file: 'go.mod'
- name: Generate a token
id: generate_token
uses: raidiam/create-github-app-token@v1
with:
app_id: ${{ secrets.WORKFLOW_APP_ID }}
private_key: ${{ secrets.WORKFLOW_APP_PRIVATE_KEY }}
repositories: "golambda,go-alb-proxy,go-kms-signer,go-slogctx"
- name: Configure golang github clone token
env:
GOPRIVATE: "github.com/raidiam/*"
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
git config --global url.https://x-access-token:$GITHUB_TOKEN@github.com/.insteadOf https://github.com/
- name: pre-commit
uses: pre-commit/action@v3.0.1
env:
SKIP: no-commit-to-branch