[Exporter.Prometheus] Avoid allocations for tags #5735
Workflow file for this run
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: 'Add labels to issues and pull requests' | |
| on: | |
| issues: | |
| types: [ opened ] | |
| pull_request_target: # zizmor: ignore[dangerous-triggers] Only code from the main branch is executed | |
| branches: [ 'main*' ] | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| add-labels-on-issues: | |
| name: Add labels to issues | |
| permissions: | |
| contents: read # To checkout the code | |
| issues: write # To add labels to the issue | |
| if: github.event.repository.fork == false && github.event_name == 'issues' && !github.event.issue.pull_request | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| filter: 'tree:0' | |
| persist-credentials: false | |
| show-progress: false | |
| - name: Add labels for package found in bug issue descriptions | |
| shell: pwsh | |
| run: | | |
| Import-Module .\build\scripts\add-labels.psm1 | |
| AddLabelsOnIssuesForPackageFoundInBody ` | |
| -issueNumber ${env:ISSUE_NUMBER} ` | |
| -issueBody $env:ISSUE_BODY | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| ISSUE_BODY: ${{ github.event.issue.body }} | |
| ISSUE_NUMBER: ${{ github.event.issue.number }} | |
| add-labels-on-pull-requests: | |
| name: Add labels to pull requests | |
| permissions: | |
| contents: read # To checkout the code | |
| pull-requests: write # To add labels to the PR | |
| if: github.event.repository.fork == false && github.event_name == 'pull_request_target' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| filter: 'tree:0' | |
| persist-credentials: false | |
| # Note: Do not run on the PR branch we want to execute add-labels.psm1 from main on the base repo only because pull_request_target can see secrets | |
| ref: ${{ github.event.repository.default_branch }} | |
| show-progress: false | |
| - name: Add labels for files changed on pull requests | |
| shell: pwsh | |
| run: | | |
| Import-Module .\build\scripts\add-labels.psm1 | |
| AddLabelsOnPullRequestsBasedOnFilesChanged ` | |
| -pullRequestNumber ${env:PR_NUMBER} ` | |
| -labelPackagePrefix 'pkg:' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} |