Update Latest Dependency #508
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Update Latest Dependency' | |
| on: # yamllint disable-line rule:truthy | |
| schedule: | |
| - cron: '0 0 * * *' # Every day at midnight | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| # Default permissions for all jobs | |
| permissions: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| engine: | |
| # ADD NEW RUBIES HERE | |
| - name: ruby | |
| version: '4.0' | |
| - name: ruby | |
| version: '3.4' | |
| - name: ruby | |
| version: '3.3' | |
| - name: ruby | |
| version: '3.2' | |
| - name: ruby | |
| version: '3.1' | |
| - name: ruby | |
| version: '3.0' | |
| - name: ruby | |
| version: '2.7' | |
| container: | |
| image: 'ghcr.io/datadog/images-rb/engines/${{ matrix.engine.name }}:${{ matrix.engine.version }}' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Bundle | |
| run: bundle install | |
| - name: Generate gemfiles | |
| run: bundle exec appraisal generate | |
| - name: Update to the latest versions | |
| run: bundle exec appraisal update | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: 'gha${{ github.run_id }}-datadog-ci-gem-${{ matrix.engine.name }}-${{ matrix.engine.version }}' | |
| path: gemfiles/${{ matrix.engine.name }}_${{ matrix.engine.version }}_* | |
| retention-days: 1 | |
| aggregate: | |
| needs: build | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Download artifacts for all runtimes | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| path: gemfiles | |
| pattern: gha${{ github.run_id }}-datadog-ci-gem-* | |
| merge-multiple: true | |
| - run: git diff --color=always | |
| - name: Get GitHub Token via dd-octo-sts | |
| id: generate-token | |
| uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4 | |
| with: | |
| scope: DataDog/datadog-ci-rb | |
| policy: self.update-latest-dependencies | |
| - name: Create Pull Request | |
| id: cpr | |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| branch: auto-generate/update-latest-dependencies | |
| title: '[🤖] Update Latest Dependency' | |
| base: main | |
| labels: internal | |
| commit-message: '[🤖] Update Latest Dependency: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' | |
| delete-branch: true | |
| sign-commits: true | |
| body: | | |
| _This is an auto-generated PR from [here](https://github.com/DataDog/datadog-ci-rb/blob/main/.github/workflows/update-latest-dependencies.yml), which creates a pull request that will be continually updated with new changes until it is merged or closed)_ | |
| The PR updates latest versions of defined dependencies. Please review the changes and merge when ready. |