Skip to content

Commit a4da60d

Browse files
authored
chore(copier): update from template
1 parent c7629d2 commit a4da60d

3 files changed

Lines changed: 30 additions & 11 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: 01a3d3d
5+
_commit: c7900f6
66
_src_path: gh:liblaf/copier-share
77
author_email: 30631553+liblaf@users.noreply.github.com
88
author_name: liblaf

.envrc

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,30 @@
22
# This file is @generated by <https://github.com/liblaf/copier-shared>.
33
# DO NOT EDIT!
44

5-
function load-direnv() {
5+
export DIRENV_ROOT="$PWD"
6+
7+
function find-sources() {
68
local starting="$1"
79
if [[ ! -d $starting ]]; then
810
return
911
fi
10-
readarray -t files < <(find "$starting" -name "*.sh" -type f | sort)
11-
for file in "${files[@]}"; do
12-
source_env_if_exists "$file"
13-
done
12+
find "$starting" -name "*.sh" -type f
1413
}
1514

16-
export DIRENV_ROOT="$PWD"
17-
load-direnv "$PWD/.config/copier/direnv/"
18-
load-direnv "$PWD/.config/direnv/"
15+
readarray -t files < <(
16+
find-sources "$PWD/.config/copier/direnv/"
17+
find-sources "$PWD/.config/direnv/"
18+
)
19+
20+
readarray -t files < <(
21+
for file in "${files[@]}"; do
22+
name="$(basename -- "$file")"
23+
printf "%s\t%s\n" "$name" "$file"
24+
done |
25+
sort |
26+
cut --fields="2"
27+
)
28+
29+
for file in "${files[@]}"; do
30+
source_env_if_exists "$file"
31+
done

.github/workflows/mega-linter.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ jobs:
2121
actions: write
2222
runs-on: "ubuntu-latest"
2323
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"
2430
- uses: MercuryTechnologies/delete-cancelled-runs@1.0.0
2531
with:
26-
workflow-file: mega-linter.yaml
27-
github-token: ${{ secrets.GH_PAT || github.token }}
32+
workflow-file: ${{ steps.workflow.outputs.file }}
33+
github-token: ${{ github.token }}
2834

2935
mega-linter:
3036
name: MegaLinter

0 commit comments

Comments
 (0)