diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index ab99c49d1..6e4110d60 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -27,7 +27,7 @@ jobs: - id: install-secret-key name: Install GPG secret key run: | - cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import + printf '%s' "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import gpg --list-secret-keys --keyid-format LONG - name: Set up JDK ${{ matrix.java-version }} diff --git a/.github/workflows/_codeql.yml b/.github/workflows/_codeql.yml index e52a09168..00bdb7365 100644 --- a/.github/workflows/_codeql.yml +++ b/.github/workflows/_codeql.yml @@ -35,7 +35,7 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: - languages: ${{ matrix.language }} + languages: java # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. diff --git a/.github/workflows/_publish-code.yml b/.github/workflows/_publish-code.yml index bd481ce15..20ee708f5 100644 --- a/.github/workflows/_publish-code.yml +++ b/.github/workflows/_publish-code.yml @@ -4,6 +4,9 @@ on: workflow_call: workflow_dispatch: +permissions: + security-events: write + jobs: publish: runs-on: ubuntu-latest @@ -16,7 +19,7 @@ jobs: - id: install-secret-key name: Install GPG secret key run: | - cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import + printf '%s' "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import gpg --list-secret-keys --keyid-format LONG - name: Set up JDK diff --git a/.github/workflows/_publish-docs.yml b/.github/workflows/_publish-docs.yml index f03886cab..3471292eb 100644 --- a/.github/workflows/_publish-docs.yml +++ b/.github/workflows/_publish-docs.yml @@ -26,7 +26,7 @@ jobs: - name: Delombok run: | LOMBOK_VERSION=$(mvn help:evaluate -Dexpression=org.projectlombok.version -q -DforceStdout) - java -jar ./target/dependency/lombok-$LOMBOK_VERSION.jar delombok src -d src-delomboked + java -jar ./target/dependency/lombok-"$LOMBOK_VERSION".jar delombok src -d src-delomboked mv src src-lomboked mv src-delomboked src diff --git a/.github/workflows/_workflow_lint.yml b/.github/workflows/_workflow_lint.yml new file mode 100644 index 000000000..8eb219046 --- /dev/null +++ b/.github/workflows/_workflow_lint.yml @@ -0,0 +1,20 @@ +name: Lint workflows + +on: + workflow_call: + +permissions: + contents: read + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Download actionlint + id: get_actionlint + run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + shell: bash + - name: Run actionlint + run: ${{ steps.get_actionlint.outputs.executable }} -color + shell: bash diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index c9adc5804..22cbcad05 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -6,6 +6,7 @@ on: permissions: contents: read + actions: read jobs: codeql: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e2a94165d..d3942bf94 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -8,8 +8,11 @@ permissions: pull-requests: read jobs: + workflow-lint: + uses: ./.github/workflows/_workflow_lint.yml static_analysis: uses: ./.github/workflows/_static-analysis.yml + needs: workflow-lint build: uses: ./.github/workflows/_build.yml needs: static_analysis