Skip to content

Commit 0c281f4

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

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
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/release-actions.yml@c4cef36590a837182788f2e1b02dee17a3647be6 # 0.4.0
2935
with:
3036
update-all: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' }}

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 "::error ::Unable to detect package manager";
47+
exit 1;

0 commit comments

Comments
 (0)