Update OTel Collector Dependencies and Generate OTel Agent #9
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 OTel Collector Dependencies and Generate OTel Agent | |
| on: | |
| schedule: | |
| - cron: '0 12 * * 3' | |
| workflow_dispatch: | |
| jobs: | |
| update-and-generate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # This is required for getting the required OIDC token from GitHub | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up Go | |
| uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
| with: | |
| go-version-file: .go-version | |
| - name: Install dda | |
| uses: ./.github/actions/install-dda | |
| with: | |
| features: legacy-tasks | |
| - uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3 | |
| id: octo-sts | |
| with: | |
| scope: DataDog/datadog-agent | |
| policy: self.collector-generate-and-update.create-pr | |
| - name: Run Collector Update Script | |
| id: collector-update | |
| env: | |
| GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }} | |
| run: | | |
| dda inv -- -e install-tools | |
| dda inv -- -e collector.update | |
| echo "OCB_VERSION=$OCB_VERSION" >> $GITHUB_OUTPUT | |
| dda inv -- -e collector.generate | |
| dda inv -- -e generate-licenses | |
| - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| name: Create pull request | |
| with: | |
| token: ${{ steps.octo-sts.outputs.token }} | |
| commit-message: Update OTel Collector dependencies to ${{ steps.collector-update.outputs.OCB_VERSION}} and generate OTel Agent | |
| branch: update-otel-collector-dependencies-${{ steps.collector-update.outputs.OCB_VERSION}} | |
| sign-commits: true | |
| title: Update OTel Collector dependencies to v${{ steps.collector-update.outputs.OCB_VERSION}} | |
| body: This PR updates the dependencies of the OTel Collector to v{OCB_VERSION} and generates the OTel Agent code. | |
| draft: true |