Skip to content

Commit 86ed79d

Browse files
🔧 add CI workflow checker (#333)
1 parent bbd2469 commit 86ed79d

7 files changed

Lines changed: 31 additions & 4 deletions

File tree

.github/workflows/_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- id: install-secret-key
2828
name: Install GPG secret key
2929
run: |
30-
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
30+
printf '%s' "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import
3131
gpg --list-secret-keys --keyid-format LONG
3232
3333
- name: Set up JDK ${{ matrix.java-version }}

.github/workflows/_codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Initialize CodeQL
3636
uses: github/codeql-action/init@v4
3737
with:
38-
languages: ${{ matrix.language }}
38+
languages: java
3939
# If you wish to specify custom queries, you can do so here or in a config file.
4040
# By default, queries listed here will override any specified in a config file.
4141
# Prefix the list here with "+" to use these queries and those in the config file.

.github/workflows/_publish-code.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_call:
55
workflow_dispatch:
66

7+
permissions:
8+
security-events: write
9+
710
jobs:
811
publish:
912
runs-on: ubuntu-latest
@@ -16,7 +19,7 @@ jobs:
1619
- id: install-secret-key
1720
name: Install GPG secret key
1821
run: |
19-
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
22+
printf '%s' "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import
2023
gpg --list-secret-keys --keyid-format LONG
2124
2225
- name: Set up JDK

.github/workflows/_publish-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Delombok
2727
run: |
2828
LOMBOK_VERSION=$(mvn help:evaluate -Dexpression=org.projectlombok.version -q -DforceStdout)
29-
java -jar ./target/dependency/lombok-$LOMBOK_VERSION.jar delombok src -d src-delomboked
29+
java -jar ./target/dependency/lombok-"$LOMBOK_VERSION".jar delombok src -d src-delomboked
3030
mv src src-lomboked
3131
mv src-delomboked src
3232
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Lint workflows
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
actionlint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Download actionlint
15+
id: get_actionlint
16+
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
17+
shell: bash
18+
- name: Run actionlint
19+
run: ${{ steps.get_actionlint.outputs.executable }} -color
20+
shell: bash

.github/workflows/cron.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
permissions:
88
contents: read
9+
actions: read
910

1011
jobs:
1112
codeql:

.github/workflows/pull-request.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ permissions:
88
pull-requests: read
99

1010
jobs:
11+
workflow-lint:
12+
uses: ./.github/workflows/_workflow_lint.yml
1113
static_analysis:
1214
uses: ./.github/workflows/_static-analysis.yml
15+
needs: workflow-lint
1316
build:
1417
uses: ./.github/workflows/_build.yml
1518
needs: static_analysis

0 commit comments

Comments
 (0)