From 0d7ebad39c9a6735d4f70796f3c9b8502a9e969c Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Wed, 17 Apr 2024 11:07:48 +0200 Subject: [PATCH] ci: add automerge workflow, update some actions --- .github/workflows/dependabot-auto-merge.yaml | 23 ++++++++++++++++++++ .github/workflows/main.yaml | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/dependabot-auto-merge.yaml diff --git a/.github/workflows/dependabot-auto-merge.yaml b/.github/workflows/dependabot-auto-merge.yaml new file mode 100644 index 0000000..44b6524 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yaml @@ -0,0 +1,23 @@ +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Enable auto-merge for Dependabot PRs + if: steps.metadata.outputs.update-type != 'version-update:semver-major' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 478c9d0..65a309a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -30,7 +30,7 @@ jobs: restore-keys: | ${{ runner.os }}-gradle-wrapper- - name: Verify Gradle wrapper checksum - uses: gradle/wrapper-validation-action@b5418f5a58f5fd2eb486dd7efb368fe7be7eae45 # ratchet:gradle/wrapper-validation-action@v2 + uses: gradle/wrapper-validation-action@460a3ca55fc5d559238a0efc7fa9f7465df8585d # ratchet:gradle/wrapper-validation-action@v3 - name: Build with Gradle run: ./gradlew clean wonderwalled-${{ matrix.module }}:build wonderwalled-${{ matrix.module }}:shadowJar - uses: nais/platform-build-push-sign@main # ratchet:exclude @@ -43,7 +43,7 @@ jobs: multi-platform: true push: true workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }} - - uses: nais/deploy/actions/deploy@v1 # ratchet:exclude + - uses: nais/deploy/actions/deploy@v2 # ratchet:exclude env: APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} CLUSTER: dev-gcp