mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 12:41:46 +00:00
Merge branch 'dev' of github.com:tw93/Mole into dev
This commit is contained in:
23
.github/workflows/check.yml
vendored
23
.github/workflows/check.yml
vendored
@@ -27,20 +27,25 @@ jobs:
|
||||
~/Library/Caches/Homebrew
|
||||
/usr/local/Cellar/shfmt
|
||||
/usr/local/Cellar/shellcheck
|
||||
key: ${{ runner.os }}-brew-quality-${{ hashFiles('**/Brewfile') }}
|
||||
/usr/local/Cellar/golangci-lint
|
||||
key: ${{ runner.os }}-brew-quality-v2-${{ hashFiles('**/Brewfile') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-brew-quality-
|
||||
${{ runner.os }}-brew-quality-v2-
|
||||
|
||||
- name: Install tools
|
||||
run: brew install shfmt shellcheck
|
||||
run: brew install shfmt shellcheck golangci-lint
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v5
|
||||
with:
|
||||
go-version: '1.24.6'
|
||||
|
||||
- name: Install goimports
|
||||
run: go install golang.org/x/tools/cmd/goimports@latest
|
||||
|
||||
- name: Format all code
|
||||
run: |
|
||||
export PATH=$(go env GOPATH)/bin:$PATH
|
||||
./scripts/check.sh --format
|
||||
|
||||
- name: Commit formatting changes
|
||||
@@ -75,12 +80,18 @@ jobs:
|
||||
~/Library/Caches/Homebrew
|
||||
/usr/local/Cellar/shfmt
|
||||
/usr/local/Cellar/shellcheck
|
||||
key: ${{ runner.os }}-brew-quality-${{ hashFiles('**/Brewfile') }}
|
||||
/usr/local/Cellar/golangci-lint
|
||||
key: ${{ runner.os }}-brew-quality-v2-${{ hashFiles('**/Brewfile') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-brew-quality-
|
||||
${{ runner.os }}-brew-quality-v2-
|
||||
|
||||
- name: Install tools
|
||||
run: brew install shfmt shellcheck
|
||||
run: brew install shfmt shellcheck golangci-lint
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v5
|
||||
with:
|
||||
go-version: '1.24.6'
|
||||
|
||||
- name: Run check script
|
||||
run: ./scripts/check.sh --no-format
|
||||
|
||||
62
.github/workflows/update-contributors.yml
vendored
Normal file
62
.github/workflows/update-contributors.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: Update Contributors
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, dev]
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * 0" # Every Sunday at midnight UTC
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
update-contributors:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Generate contributors SVG
|
||||
uses: tw93/contributors-list@master
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
svgPath: CONTRIBUTORS.svg
|
||||
svgWidth: 1000
|
||||
avatarSize: 72
|
||||
avatarMargin: 45
|
||||
userNameHeight: 20
|
||||
noFetch: false
|
||||
noCommit: true
|
||||
truncate: 0
|
||||
includeBots: false
|
||||
excludeUsers: "github-actions web-flow dependabot claude"
|
||||
itemTemplate: |
|
||||
<g transform="translate({{ x }}, {{ y }})">
|
||||
<defs>
|
||||
<clipPath id="cp-{{ login }}">
|
||||
<circle cx="36" cy="36" r="36" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<a xlink:href="{{{ url }}}" href="{{{ url }}}" class="contributor-link" target="_blank" rel="nofollow sponsored" title="{{{ name }}}">
|
||||
<image width="72" height="72" xlink:href="{{{ avatar }}}" href="{{{ avatar }}}" clip-path="url(#cp-{{ login }})" />
|
||||
<text x="36" y="86" text-anchor="middle" alignment-baseline="middle" font-size="10" fill="#666" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif">{{{ name }}}</text>
|
||||
</a>
|
||||
</g>
|
||||
|
||||
- name: Commit & Push
|
||||
uses: stefanzweifel/git-auto-commit-action@v7
|
||||
with:
|
||||
commit_message: "chore: update contributors [skip ci]"
|
||||
file_pattern: CONTRIBUTORS.svg
|
||||
commit_user_name: github-actions[bot]
|
||||
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
|
||||
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
push_options: '--force'
|
||||
Reference in New Issue
Block a user