@liblaf/actions 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/approve/README.md +65 -0
- package/dist/approve/action.yaml +35 -0
- package/dist/approve/src/index.js +162 -0
- package/dist/auth/action.yaml +107 -0
- package/dist/authenticate/action.yaml +109 -0
- package/dist/changelog/action.yaml +84 -0
- package/dist/changelog/cliff.toml +107 -0
- package/dist/commit/action.yaml +58 -0
- package/dist/copier-update/action.yaml +25 -0
- package/dist/delete-cancelled-runs/action.yaml +23 -0
- package/dist/delete-cancelled-runs/src/index.js +163 -0
- package/dist/install/action.yaml +60 -0
- package/dist/mega-linter/action.yaml +65 -0
- package/dist/mega-linter/post.sh +8 -0
- package/dist/mega-linter/pre.sh +16 -0
- package/dist/pr-label/action.yaml +38 -0
- package/dist/pr-label/src/index.js +162 -0
- package/dist/pre/action.yaml +111 -0
- package/dist/release/action.yaml +35 -0
- package/dist/release/src/index.js +168 -0
- package/dist/ruleset-import/action.yaml +29 -0
- package/dist/ruleset-import/src/index.js +162 -0
- package/dist/setup-pages/action.yaml +21 -0
- package/dist/setup-pages/src/index.js +162 -0
- package/dist/setup-python/action.yaml +67 -0
- package/dist/skip-duplicate/action.yaml +91 -0
- package/dist/template/README.md +7 -0
- package/dist/template/action.yaml +26 -0
- package/dist/template/src/index.js +64 -0
- package/package.json +66 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
|
|
2
|
+
|
|
3
|
+
name: Setup Python
|
|
4
|
+
|
|
5
|
+
author: liblaf
|
|
6
|
+
|
|
7
|
+
description: Setup Python
|
|
8
|
+
|
|
9
|
+
outputs:
|
|
10
|
+
pixi:
|
|
11
|
+
description: pixi
|
|
12
|
+
value: ${{ steps.manager.outputs.pixi }}
|
|
13
|
+
uv:
|
|
14
|
+
description: uv
|
|
15
|
+
value: ${{ steps.manager.outputs.uv }}
|
|
16
|
+
|
|
17
|
+
runs:
|
|
18
|
+
using: composite
|
|
19
|
+
steps:
|
|
20
|
+
- id: manager
|
|
21
|
+
name: Detect Package Manager
|
|
22
|
+
run: |-
|
|
23
|
+
function detect-manager() {
|
|
24
|
+
local manager="$1"
|
|
25
|
+
local lockfile="$2"
|
|
26
|
+
if [[ -n "$(find '.' -name "$lockfile" -type f)" ]]; then
|
|
27
|
+
printf '%s=true\n' "$manager" >> "$GITHUB_OUTPUT"
|
|
28
|
+
else
|
|
29
|
+
printf '%s=false\n' "$manager" >> "$GITHUB_OUTPUT"
|
|
30
|
+
fi
|
|
31
|
+
}
|
|
32
|
+
detect-manager 'uv' 'uv.lock'
|
|
33
|
+
detect-manager 'pixi' 'pixi.lock'
|
|
34
|
+
shell: bash
|
|
35
|
+
- if: steps.manager.outputs.pixi == 'true'
|
|
36
|
+
name: Setup Pixi
|
|
37
|
+
uses: prefix-dev/setup-pixi@v0
|
|
38
|
+
with:
|
|
39
|
+
run-install: true
|
|
40
|
+
activate-environment: true
|
|
41
|
+
locked: false
|
|
42
|
+
- if: steps.manager.outputs.pixi == 'true'
|
|
43
|
+
name: Install Dependencies
|
|
44
|
+
run: hatch build --hooks-only
|
|
45
|
+
shell: bash
|
|
46
|
+
- id: python
|
|
47
|
+
if: steps.manager.outputs.uv == 'true'
|
|
48
|
+
name: Setup Python
|
|
49
|
+
uses: actions/setup-python@v6
|
|
50
|
+
with:
|
|
51
|
+
python-version-file: pyproject.toml
|
|
52
|
+
- if: steps.manager.outputs.uv == 'true'
|
|
53
|
+
name: Setup uv
|
|
54
|
+
uses: astral-sh/setup-uv@v7
|
|
55
|
+
with:
|
|
56
|
+
python-version: ${{ steps.python.outputs.python-version }}
|
|
57
|
+
- if: steps.manager.outputs.uv == 'true'
|
|
58
|
+
name: Install Dependencies
|
|
59
|
+
run: uv sync --all-extras --all-groups
|
|
60
|
+
shell: bash
|
|
61
|
+
- if: steps.manager.outputs.uv == 'true'
|
|
62
|
+
name: Activate venv
|
|
63
|
+
run: |-
|
|
64
|
+
source '.venv/bin/activate'
|
|
65
|
+
echo "$VIRTUAL_ENV/bin" >> "$GITHUB_PATH"
|
|
66
|
+
printf 'VIRTUAL_ENV=%s\n' "$VIRTUAL_ENV" >> "$GITHUB_OUTPUT"
|
|
67
|
+
shell: bash
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
name: Skip Duplicate
|
|
2
|
+
|
|
3
|
+
author: liblaf
|
|
4
|
+
|
|
5
|
+
description: Skip duplicate workflow runs. Skip or ignore specific paths. Cancel outdated workflow runs.
|
|
6
|
+
|
|
7
|
+
inputs:
|
|
8
|
+
# shared:
|
|
9
|
+
token:
|
|
10
|
+
description: Your GitHub Access Token
|
|
11
|
+
default: ${{ github.token }}
|
|
12
|
+
# delete-cancelled-runs
|
|
13
|
+
max-deletions:
|
|
14
|
+
description: The maximum number of cancelled runs to delete
|
|
15
|
+
default: "3"
|
|
16
|
+
workflow:
|
|
17
|
+
description: The ID of the workflow. You can also pass the workflow file name as a string.
|
|
18
|
+
default: ${{ github.workflow_ref }}
|
|
19
|
+
# skip-duplicate-actions
|
|
20
|
+
paths-ignore:
|
|
21
|
+
description: A JSON-array with ignored path patterns
|
|
22
|
+
default: "[]"
|
|
23
|
+
paths:
|
|
24
|
+
description: A JSON-array with path patterns
|
|
25
|
+
default: "[]"
|
|
26
|
+
paths-filter:
|
|
27
|
+
description: A YAML-string with named paths_ignore/paths patterns
|
|
28
|
+
cancel-others:
|
|
29
|
+
description: If true, then workflow runs from outdated commits will be cancelled
|
|
30
|
+
default: "false"
|
|
31
|
+
skip-after-successful-duplicate:
|
|
32
|
+
description: If true, skip if an already finished duplicate run can be found
|
|
33
|
+
default: "true"
|
|
34
|
+
do-not-skip:
|
|
35
|
+
description: A JSON-array with triggers that should never be skipped
|
|
36
|
+
default: |-
|
|
37
|
+
[
|
|
38
|
+
"merge_group",
|
|
39
|
+
"schedule",
|
|
40
|
+
"workflow_dispatch"
|
|
41
|
+
]
|
|
42
|
+
concurrent-skipping:
|
|
43
|
+
description: One of never, same_content, same_content_newer, outdated_runs, always
|
|
44
|
+
default: same_content_newer
|
|
45
|
+
skip-summary:
|
|
46
|
+
description: If true, make the workflow logs shorter
|
|
47
|
+
default: "false"
|
|
48
|
+
|
|
49
|
+
outputs:
|
|
50
|
+
# skip-duplicate-actions
|
|
51
|
+
should-skip:
|
|
52
|
+
description: Returns true if the current run should be skipped according to your configured rules
|
|
53
|
+
value: ${{ steps.skip-duplicate-actions.outputs.should_skip }}
|
|
54
|
+
reason:
|
|
55
|
+
description: The reason why the current run is considered skippable or unskippable
|
|
56
|
+
value: ${{ steps.skip-duplicate-actions.outputs.reason }}
|
|
57
|
+
skipped-by:
|
|
58
|
+
description: Returns information about the workflow run which caused the current run to be skipped
|
|
59
|
+
value: ${{ steps.skip-duplicate-actions.outputs.skipped_by }}
|
|
60
|
+
changed-files:
|
|
61
|
+
description: A two-dimensional array, with a list of changed files for each commit that was traced back
|
|
62
|
+
value: ${{ steps.skip-duplicate-actions.outputs.changed_files }}
|
|
63
|
+
paths-result:
|
|
64
|
+
description: Returns information for each configured filter in paths_filter
|
|
65
|
+
value: ${{ steps.skip-duplicate-actions.outputs.paths_result }}
|
|
66
|
+
|
|
67
|
+
runs:
|
|
68
|
+
using: composite
|
|
69
|
+
steps:
|
|
70
|
+
- id: skip-duplicate-actions
|
|
71
|
+
name: Skip Duplicate Actions
|
|
72
|
+
uses: fkirc/skip-duplicate-actions@v5
|
|
73
|
+
with:
|
|
74
|
+
github_token: ${{ inputs.token }}
|
|
75
|
+
paths_ignore: ${{ inputs.paths-ignore }}
|
|
76
|
+
paths: ${{ inputs.paths }}
|
|
77
|
+
paths_filter: ${{ inputs.paths-filter }}
|
|
78
|
+
cancel_others: ${{ inputs.cancel-others }}
|
|
79
|
+
skip_after_successful_duplicate: ${{ inputs.skip-after-successful-duplicate }}
|
|
80
|
+
do_not_skip: ${{ inputs.do-not-skip }}
|
|
81
|
+
concurrent_skipping: ${{ inputs.concurrent-skipping }}
|
|
82
|
+
continue-on-error: true
|
|
83
|
+
|
|
84
|
+
- id: delete-cancelled-runs
|
|
85
|
+
name: Delete Cancelled Runs
|
|
86
|
+
uses: liblaf/actions/delete-cancelled-runs@dist
|
|
87
|
+
with:
|
|
88
|
+
max-deletions: ${{ inputs.max-deletions }}
|
|
89
|
+
token: ${{ inputs.token }}
|
|
90
|
+
workflow: ${{ inputs.workflow }}
|
|
91
|
+
continue-on-error: true
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
|
|
2
|
+
|
|
3
|
+
name: The name of your action here
|
|
4
|
+
description: Provide a description here
|
|
5
|
+
author: Your name or organization here
|
|
6
|
+
|
|
7
|
+
# Add your action's branding here. This will appear on the GitHub Marketplace.
|
|
8
|
+
branding:
|
|
9
|
+
icon: heart
|
|
10
|
+
color: red
|
|
11
|
+
|
|
12
|
+
# Define your inputs here.
|
|
13
|
+
inputs:
|
|
14
|
+
milliseconds:
|
|
15
|
+
description: Your input description here
|
|
16
|
+
required: true
|
|
17
|
+
default: "1000"
|
|
18
|
+
|
|
19
|
+
# Define your outputs here.
|
|
20
|
+
outputs:
|
|
21
|
+
time:
|
|
22
|
+
description: Your output description here
|
|
23
|
+
|
|
24
|
+
runs:
|
|
25
|
+
using: node24
|
|
26
|
+
main: src/index.js
|