From 693910f59d35bcef5c9e3c3ea6b0f92582cf51a8 Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 31 May 2024 15:24:05 +0200 Subject: [PATCH] upgrade some GHA, add datadog-static-analysis workflow --- .../add-milestone-to-pull-requests.yml | 2 +- .github/workflows/build-gem.yml | 6 +++--- .github/workflows/check.yml | 4 ++-- .github/workflows/datadog-static-analysis.yml | 21 +++++++++++++++++++ .github/workflows/yard.yml | 2 +- 5 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/datadog-static-analysis.yml diff --git a/.github/workflows/add-milestone-to-pull-requests.yml b/.github/workflows/add-milestone-to-pull-requests.yml index fed57269..2ff00b17 100644 --- a/.github/workflows/add-milestone-to-pull-requests.yml +++ b/.github/workflows/add-milestone-to-pull-requests.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout code # Checks out the branch that the pull request is merged into - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.ref }} diff --git a/.github/workflows/build-gem.yml b/.github/workflows/build-gem.yml index 626c987a..44839d90 100644 --- a/.github/workflows/build-gem.yml +++ b/.github/workflows/build-gem.yml @@ -28,9 +28,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@31a7f6d628878b80bc63375a93ae079ec50a1601 # v1.143.0 + - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.2' + ruby-version: '3.3' bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Patch version if: ${{ matrix.type != 'final' }} @@ -122,7 +122,7 @@ jobs: find pkg - uses: ruby/setup-ruby@31a7f6d628878b80bc63375a93ae079ec50a1601 # v1.143.0 with: - ruby-version: '3.2' + ruby-version: '3.3' - name: Install gem run: | gem install pkg/*.gem diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ea256174..b2949916 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,9 +11,9 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@31a7f6d628878b80bc63375a93ae079ec50a1601 # v1.143.0 + - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.2' + ruby-version: '3.3' bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Check for stale signature files run: bundle exec rake rbs:stale diff --git a/.github/workflows/datadog-static-analysis.yml b/.github/workflows/datadog-static-analysis.yml new file mode 100644 index 00000000..be35a97f --- /dev/null +++ b/.github/workflows/datadog-static-analysis.yml @@ -0,0 +1,21 @@ +on: [push] + +name: Datadog Static Analysis + +jobs: + static-analysis: + runs-on: ubuntu-latest + name: Datadog Static Analyzer + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Check code meets quality and security standards + id: datadog-static-analysis + uses: DataDog/datadog-static-analyzer-github-action@v1 + with: + dd_api_key: ${{ secrets.DD_API_KEY }} + dd_app_key: ${{ secrets.DD_APP_KEY }} + dd_service: datadog-ci-rb + dd_env: ci + dd_site: datadoghq.com + cpu_count: 2 diff --git a/.github/workflows/yard.yml b/.github/workflows/yard.yml index 30f63046..800d5fd8 100644 --- a/.github/workflows/yard.yml +++ b/.github/workflows/yard.yml @@ -30,7 +30,7 @@ jobs: uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.2' + ruby-version: '3.3' bundler-cache: true - name: Generate YARD documentation run: bundle exec rake docs