Skip to content

Commit bdf6166

Browse files
committed
ci: use linter for Github Actions
Signed-off-by: Emilien Escalle <[email protected]>
1 parent bb5ef71 commit bdf6166

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

.github/workflows/__main-ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches: [main]
66
tags: ["*"]
77

8+
workflow_dispatch:
9+
10+
schedule:
11+
- cron: "25 8 * * 1"
12+
813
permissions:
914
actions: write
1015
contents: write
@@ -25,6 +30,7 @@ jobs:
2530

2631
release:
2732
needs: ci
33+
if: github.event_name != 'schedule'
2834
uses: hoverkraft-tech/ci-github-publish/.github/workflows/[email protected]
2935
with:
3036
update-all: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' }}

.github/workflows/__shared-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
jobs:
1414
linter:
15-
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@0.18.0
15+
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter-actions.yml@0.19.0
1616

1717
test-action-get-package-manager:
1818
name: Test action "get-package-manager"

actions/get-package-manager/action.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ runs:
2727
run: |
2828
# Yarn
2929
if [ -f "yarn.lock" ]; then
30-
echo "package-manager=yarn" >> "$GITHUB_OUTPUT"
31-
echo "cache-dependency-path=**/yarn.lock" >> "$GITHUB_OUTPUT"
32-
echo "install-command=yarn install --frozen-lockfile" >> "$GITHUB_OUTPUT"
33-
echo "run-script-command=yarn" >> "$GITHUB_OUTPUT"
34-
exit 0
30+
echo "package-manager=yarn" >> "$GITHUB_OUTPUT";
31+
echo "cache-dependency-path=**/yarn.lock" >> "$GITHUB_OUTPUT";
32+
echo "install-command=yarn install --frozen-lockfile" >> "$GITHUB_OUTPUT";
33+
echo "run-script-command=yarn" >> "$GITHUB_OUTPUT";
34+
exit 0;
3535
fi
3636
3737
# NPM
3838
if [ -f "package-lock.json" ]; then
39-
echo "package-manager=npm" >> "$GITHUB_OUTPUT"
40-
echo "cache-dependency-path=**/package-lock.json" >> "$GITHUB_OUTPUT"
41-
echo "install-command=npm ci" >> "$GITHUB_OUTPUT"
42-
echo "run-script-command=npm run" >> "$GITHUB_OUTPUT"
43-
exit 0
39+
echo "package-manager=npm" >> "$GITHUB_OUTPUT";
40+
echo "cache-dependency-path=**/package-lock.json" >> "$GITHUB_OUTPUT";
41+
echo "install-command=npm ci" >> "$GITHUB_OUTPUT";
42+
echo "run-script-command=npm run" >> "$GITHUB_OUTPUT";
43+
exit 0;
4444
fi
4545
46-
echo "Unable to detect package manager"
47-
exit 1
46+
echo "Unable to detect package manager" >> "$GITHUB_OUTPUT";
47+
exit 1;

0 commit comments

Comments
 (0)