Skip to content

Commit 36f5040

Browse files
authored
chore(copier): update from template
1 parent ff6911f commit 36f5040

2 files changed

Lines changed: 56 additions & 40 deletions

File tree

.config/copier/.copier-answers.shared.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is @generated by <https://github.com/liblaf/copier-shared>.
33
# DO NOT EDIT!
44
# prettier-ignore
5-
_commit: 569bd36
5+
_commit: d919b4e
66
_src_path: gh:liblaf/copier-share
77
author_email: 30631553+liblaf@users.noreply.github.com
88
author_name: liblaf

.github/workflows/mega-linter.yaml

Lines changed: 55 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,61 +6,50 @@
66

77
name: MegaLinter
88

9+
run-name: ${{ github.workflow }} @ ${{ github.ref }}
10+
911
on:
1012
push:
1113
branches-ignore:
12-
- assets**
14+
- assets
15+
- dist
1316
- gh-pages
1417
pull_request:
1518
workflow_dispatch:
1619

20+
concurrency:
21+
group: ${{ github.workflow }} @ ${{ github.ref }}
22+
cancel-in-progress: true
23+
1724
jobs:
18-
delete-cancelled-runs:
19-
name: Delete Cancelled Runs
25+
pre:
26+
name: Pre
2027
permissions:
2128
actions: write
22-
runs-on: "ubuntu-latest"
23-
steps:
24-
- id: workflow
25-
name: Get Workflow File
26-
run: |-
27-
file="${GITHUB_WORKFLOW_REF%@*}"
28-
file="$(basename -- "$file")"
29-
printf "file=%q\n" "$file" >> "$GITHUB_OUTPUT"
30-
- uses: MercuryTechnologies/delete-cancelled-runs@1.0.0
31-
with:
32-
workflow-file: ${{ steps.workflow.outputs.file }}
33-
github-token: ${{ github.token }}
34-
35-
skip-duplicate-actions:
36-
name: Skip Duplicate Actions
3729
runs-on: ubuntu-latest
3830
outputs:
39-
should-skip: ${{ steps.skip.outputs.should_skip }}
31+
should-skip: ${{ steps.pre.outputs.should-skip }}
4032
steps:
41-
- id: skip
33+
- id: pre
4234
name: Skip Duplicate Actions
43-
uses: fkirc/skip-duplicate-actions@v5
35+
uses: liblaf/actions-ts/pre@dist
4436
with:
45-
concurrent_skipping: same_content_newer
37+
cancel-others: true
4638

4739
mega-linter:
4840
name: MegaLinter
4941
permissions:
50-
contents: write # commit fix
51-
issues: write # ref: <https://megalinter.io/latest/reporters/GitHubCommentReporter/>
52-
pull-requests: write # ref: <https://megalinter.io/latest/reporters/GitHubCommentReporter/>
42+
contents: write
43+
issues: write
44+
pull-requests: write
5345
needs:
54-
- skip-duplicate-actions
55-
if: needs.skip-duplicate-actions.outputs.should-skip != 'true'
46+
- pre
47+
if: needs.pre.outputs.should-skip != 'true'
5648
runs-on: ubuntu-latest
57-
concurrency:
58-
group: ${{ github.workflow }}-${{ github.ref }}-mega-linter
59-
cancel-in-progress: true
6049
steps:
6150
- id: auth
62-
name: Auth App
63-
uses: liblaf/actions/auth-app@main
51+
name: Authenticate
52+
uses: liblaf/actions-ts/authenticate@dist
6453
with:
6554
app-id: ${{ secrets.GH_APP_ID }}
6655
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
@@ -69,15 +58,42 @@ jobs:
6958
with:
7059
ref: ${{ github.head_ref || github.ref }}
7160
token: ${{ steps.auth.outputs.token }}
72-
- name: MegaLinter
73-
uses: liblaf/actions/mega-linter@main
61+
- id: lint
62+
name: MegaLinter
63+
uses: liblaf/actions-ts/mega-linter@dist
64+
with:
65+
token: ${{ steps.auth.outputs.token }}
66+
- if: success() || failure()
67+
name: Upload Reports
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: mega-linter-reports
71+
path: |-
72+
mega-linter.log
73+
megalinter-reports/
74+
include-hidden-files: true
75+
- if: success() || failure()
76+
name: Add Job Summary
77+
run: cat 'megalinter-reports/megalinter-report.md' >> "$GITHUB_STEP_SUMMARY"
78+
- if: github.ref == 'refs/heads/main' && steps.lint.outputs.has-updated-sources > 0
79+
name: Create PR with Applied Fixes
80+
uses: peter-evans/create-pull-request@v7
7481
with:
7582
token: ${{ steps.auth.outputs.token }}
76-
- name: Remove MegaLinter Reports
77-
run: sudo rm --force --recursive "mega-linter.log" "megalinter-reports/"
78-
- name: Commit
79-
uses: liblaf/actions/commit@main
83+
commit-message: "chore(mega-linter): apply linters automatic fixes"
84+
committer: ${{ steps.auth.outputs.committer }}
85+
author: ${{ steps.auth.outputs.author }}
86+
branch: mega-linter-fix/${{ github.ref_name }}
87+
sign-commits: true
88+
title: "chore(mega-linter): apply linters automatic fixes"
89+
body-path: megalinter-reports/megalinter-report.md
90+
labels: automerge
91+
assignees: ${{ github.repository_owner }}
92+
reviewers: ${{ github.repository_owner }}
93+
- if: github.ref != 'refs/heads/main' && steps.lint.outputs.has-updated-sources > 0
94+
name: Commit and Push Applied Linter Fixes
95+
uses: liblaf/actions-ts/commit@dist
8096
with:
8197
add-options: --verbose --update
82-
message: "chore(mega-linter): apply linter fixes"
98+
message: "chore(mega-linter): apply linters automatic fixes"
8399
token: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)