diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..9396da5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + github-actions: + patterns: + - "*" + commit-message: + prefix: ci + cooldown: + default-days: 7 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20a233b..aede192 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,23 +6,29 @@ on: branches: - main +permissions: {} + jobs: build: runs-on: ubuntu-latest + permissions: + contents: read steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Cache local Maven repository - uses: actions/cache@v4 + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - name: Set up Java - uses: actions/setup-java@v4 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: - java-version: '23' - distribution: 'temurin' + java-version: "23" + distribution: "temurin" - name: Build with Maven run: mvn -B clean package diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a95a9d8..bc97690 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,9 @@ name: Publish on: push: tags: - - '*' + - "*" + +permissions: {} jobs: publish: @@ -12,19 +14,14 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v4 - - name: Cache local Maven repository - uses: actions/cache@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + persist-credentials: false - name: Set up Java - uses: actions/setup-java@v4 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: - java-version: '23' - distribution: 'temurin' + java-version: "23" + distribution: "temurin" server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 0000000..a9c3ad4 --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,31 @@ +name: Check GitHub Actions + +on: + workflow_dispatch: + push: + branches: + - main + merge_group: + pull_request: + branches: + - main + +permissions: {} + +jobs: + zizmor: + name: Check GitHub Actions security + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Run zizmor + uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3 + with: + advanced-security: true