[pull] main from open-telemetry:main #163
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
| # Copyright The OpenTelemetry Authors | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # adds a label to a pull request if certain files are changed | |
| name: Label Pull Requests | |
| on: | |
| pull_request_target: # zizmor: ignore[dangerous-triggers] needed to label PRs from forks without checking out PR code | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| label: | |
| name: Label pull request | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write # required to add PR labels | |
| contents: read # required to inspect repository paths | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Check for changed files | |
| id: file_changes | |
| uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | |
| with: | |
| list-files: shell | |
| filters: | | |
| docsUpdateRequired: | |
| - 'src/flagd/**' | |
| helmUpdateRequired: | |
| - '.env' | |
| - 'compose*.yaml' | |
| - 'src/flagd/**' | |
| - 'src/grafana/**' | |
| - 'src/jaeger/**' | |
| - 'src/otel-collector/**' | |
| - 'src/postgresql/**' | |
| - 'src/prometheus/**' | |
| - name: Add docs-update-required label | |
| if: steps.file_changes.outputs.docsUpdateRequired == 'true' | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const issue_number = context.issue.number; | |
| github.rest.issues.addLabels({ | |
| issue_number: issue_number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['docs-update-required'] | |
| }) | |
| - name: Add helm-update-required label | |
| if: steps.file_changes.outputs.helmUpdateRequired == 'true' | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const issue_number = context.issue.number; | |
| github.rest.issues.addLabels({ | |
| issue_number: issue_number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['helm-update-required'] | |
| }) |