From cd0bc7eefaf80c37e0226100cbdf233f0f90b510 Mon Sep 17 00:00:00 2001 From: Alexey Alter-Pesotskiy Date: Fri, 4 Dec 2026 14:57:47 +0000 Subject: [PATCH] ci: add Dependabot and dependency review, pin GitHub Actions --- .github/dependabot.yml | 27 +++++++++++++++++++++++++ .github/workflows/breaking_changes.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/dependency_review.yml | 20 ++++++++++++++++++ .github/workflows/pr_title.yml | 2 +- .github/workflows/regen.yml | 6 +++--- .github/workflows/release.yml | 12 +++++------ .github/workflows/run_integration.yml | 16 +++++++-------- .github/workflows/run_tests.yml | 4 ++-- 9 files changed, 69 insertions(+), 22 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependency_review.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e680092 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,27 @@ +version: 2 + +updates: + - package-ecosystem: github-actions + directories: + - / + - /.github/actions/* + schedule: + interval: weekly + cooldown: + default-days: 4 + groups: + github-actions: + patterns: ["*"] + commit-message: + prefix: chore + include: scope + + # Version updates are off for Ruby gems: only security updates are proposed. + - package-ecosystem: bundler + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 0 + commit-message: + prefix: chore + include: scope diff --git a/.github/workflows/breaking_changes.yml b/.github/workflows/breaking_changes.yml index 1aefb08..1a218a6 100644 --- a/.github/workflows/breaking_changes.yml +++ b/.github/workflows/breaking_changes.yml @@ -103,7 +103,7 @@ jobs: echo "::error::$new brings approved breaking changes (${added//$'\n'/, }). Add '!' to the PR title to release a major, or label the PR sdk-not-breaking and name each ticket in the PR body if none of them breaks this SDK. $hold" exit 1 # A hand-written change never moves .spec-version, and a regen can break callers in ways chat's check allows, so the public methods and classes themselves are compared too, between the base tip and the merge commit. - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 if: ${{ !cancelled() }} with: fetch-depth: 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9216791..83d86c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,7 +107,7 @@ jobs: name: 🧪 Tests needs: [release-only, unit] if: ${{ !cancelled() }} - runs-on: { group: github-public-amd64 } + runs-on: ubuntu-26.04 timeout-minutes: 5 steps: - name: Check the unit lane diff --git a/.github/workflows/dependency_review.yml b/.github/workflows/dependency_review.yml new file mode 100644 index 0000000..f04cc05 --- /dev/null +++ b/.github/workflows/dependency_review.yml @@ -0,0 +1,20 @@ +name: Dependency Review + +on: + pull_request: + +permissions: + contents: read + +jobs: + dependency-review: + name: Dependency Review + runs-on: + group: github-public-amd64 + timeout-minutes: 5 + steps: + - name: Dependency Review + uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1 + with: + show-openssf-scorecard: true + warn-on-openssf-scorecard-level: 3 diff --git a/.github/workflows/pr_title.yml b/.github/workflows/pr_title.yml index cfd6193..f01dd53 100644 --- a/.github/workflows/pr_title.yml +++ b/.github/workflows/pr_title.yml @@ -12,6 +12,6 @@ jobs: name: 👮 Conventional PR title runs-on: { group: github-public-amd64 } steps: - - uses: amannn/action-semantic-pull-request@v6 + - uses: amannn/action-semantic-pull-request@66e72920af32222769c386d81f89656ebcb6d6d5 # v6.1.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/regen.yml b/.github/workflows/regen.yml index 5ceeb40..44befa7 100644 --- a/.github/workflows/regen.yml +++ b/.github/workflows/regen.yml @@ -41,7 +41,7 @@ jobs: statuses: read steps: - id: app - uses: actions/create-github-app-token@v3 + uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0 with: client-id: Iv23lioh9qYGjBIp9nsK private-key: ${{ secrets.SDK_BOT_PRIVATE_KEY }} @@ -49,13 +49,13 @@ jobs: permission-pull-requests: write # Read-only, for the generator on the chat release and the protocol release list. - id: read - uses: actions/create-github-app-token@v3 + uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0 with: client-id: Iv23lioh9qYGjBIp9nsK private-key: ${{ secrets.SDK_BOT_PRIVATE_KEY }} repositories: chat,protocol permission-contents: read - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: # The branch tip, not the commit of the event: a run queued behind another one must see the regen that one merged. ref: ${{ github.ref }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1476f16..e206984 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,13 +43,13 @@ jobs: steps: - id: app if: github.ref_name == github.event.repository.default_branch - uses: actions/create-github-app-token@v3 + uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0 with: client-id: Iv23lioh9qYGjBIp9nsK private-key: ${{ secrets.SDK_BOT_PRIVATE_KEY }} permission-contents: write permission-pull-requests: write - - uses: googleapis/release-please-action@v4 + - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 with: token: ${{ steps.app.outputs.token || github.token }} config-file: release-please-config.json @@ -190,7 +190,7 @@ jobs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} steps: - - uses: googleapis/release-please-action@v4 + - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 id: release with: config-file: release-please-config.json @@ -228,7 +228,7 @@ jobs: echo "tag=${tag}" >> "$GITHUB_OUTPUT" echo "version=${tag#v}" >> "$GITHUB_OUTPUT" - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: # refs/tags/ so that a publish_tag naming a branch or a SHA is not checked out. ref: refs/tags/${{ steps.target.outputs.tag }} @@ -266,14 +266,14 @@ jobs: echo "Tag ${TAG} (${commit}) is on ${GITHUB_REF_NAME}." - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0 with: # ubuntu-latest only publishes the latest patch of each series, so 3.1.0 404s. ruby-version: '3.1' # RubyGems Trusted Publishing: trades the job's OIDC token for a short-lived GEM_HOST_API_KEY. - name: Configure RubyGems credentials - uses: rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a # v2.1.0 + uses: rubygems/configure-rubygems-credentials@c6ca7f4bac0e29c9bde8eeae0a0a986b27efa05f # v2.2.0 - name: Build and publish gem env: diff --git a/.github/workflows/run_integration.yml b/.github/workflows/run_integration.yml index e2f5e56..393352f 100644 --- a/.github/workflows/run_integration.yml +++ b/.github/workflows/run_integration.yml @@ -27,12 +27,12 @@ jobs: environment: ci steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0 with: ruby-version: '3.1' bundler-cache: true @@ -57,12 +57,12 @@ jobs: environment: ci steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0 with: ruby-version: '3.1' bundler-cache: true @@ -81,12 +81,12 @@ jobs: environment: ci steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0 with: ruby-version: '3.1' bundler-cache: true @@ -105,12 +105,12 @@ jobs: environment: ci steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0 with: ruby-version: '3.1' bundler-cache: true diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 0b4f4ca..3853872 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -20,12 +20,12 @@ jobs: timeout-minutes: 20 steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0 with: # ubuntu-latest only publishes the latest patch of each series, so 3.1.0 404s. ruby-version: '3.1'