fix(deps): Update go.opentelemetry.io/collector/pdata to v1.60.0 (mai… #7334
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
| concurrency: | |
| group: "create-release-${{ github.sha }}" | |
| env: | |
| BUILD_ARTIFACTS_BUCKET: "loki-build-artifacts" | |
| GAR_REPO_SLUG: "loki" | |
| GITHUB_APP: "loki-gh-app" | |
| IMAGE_PREFIX: "grafana" | |
| PUBLISH_TO_GCS: false | |
| RELEASE_LIB_REF: "1e32d81ad6fbbd8c271e0bf79ce84c3e65efb0d3" | |
| RELEASE_REPO: "grafana/loki" | |
| jobs: | |
| createRelease: | |
| env: | |
| SHA: "${{ needs.shouldRelease.outputs.sha }}" | |
| if: "${{ fromJSON(needs.shouldRelease.outputs.shouldRelease) }}" | |
| needs: | |
| - "shouldRelease" | |
| outputs: | |
| draft: "${{ steps.check_release.outputs.draft }}" | |
| exists: "${{ steps.check_release.outputs.exists }}" | |
| isLatest: "${{ needs.shouldRelease.outputs.isLatest }}" | |
| name: "${{ needs.shouldRelease.outputs.name }}" | |
| sha: "${{ needs.shouldRelease.outputs.sha }}" | |
| permissions: | |
| contents: "write" | |
| id-token: "write" | |
| pull-requests: "write" | |
| runs-on: "ubuntu-x64" | |
| steps: | |
| - name: "pull code to release" | |
| uses: "actions/checkout@v4" | |
| with: | |
| path: "release" | |
| persist-credentials: false | |
| repository: "${{ env.RELEASE_REPO }}" | |
| - name: "pull release library code" | |
| uses: "actions/checkout@v4" | |
| with: | |
| path: "lib" | |
| persist-credentials: false | |
| ref: "${{ env.RELEASE_LIB_REF }}" | |
| repository: "grafana/loki-release" | |
| - name: "setup node" | |
| uses: "actions/setup-node@v4" | |
| with: | |
| node-version: 24 | |
| package-manager-cache: false | |
| - name: "enable corepack" | |
| run: "corepack enable" | |
| - id: "get_github_app_token" | |
| name: "get github app token" | |
| uses: "grafana/shared-workflows/actions/create-github-app-token@580590a644e82e79bb2598bdaba0be245a14dda0" | |
| with: | |
| github_app: "${{ env.GITHUB_APP }}" | |
| - name: "Login to GAR" | |
| uses: "grafana/shared-workflows/actions/login-to-gar@12c87e5aa323694c820c1ff3d8e47e8237e05136" | |
| - name: "download binaries" | |
| run: | | |
| echo "downloading binaries to $(pwd)/dist" | |
| mkdir -p dist | |
| gcloud artifacts generic download \ | |
| --project="grafanalabs-dev" \ | |
| --repository="generic-${{ env.GAR_REPO_SLUG }}-dev" \ | |
| --location="us" \ | |
| --package=binaries \ | |
| --version=$(echo ${SHA} | tr -d '"') \ | |
| --destination=dist/ | |
| working-directory: "release" | |
| - env: | |
| GH_TOKEN: "${{ steps.get_github_app_token.outputs.token }}" | |
| OUTPUTS_NAME: "${{ needs.shouldRelease.outputs.name }}" | |
| id: "check_release" | |
| name: "check if release exists" | |
| run: | | |
| set +e | |
| isDraft="$(gh release view --json="isDraft" --jq=".isDraft" $(echo $OUTPUTS_NAME | tr -d '"') 2>&1)" | |
| set -e | |
| if [[ "$isDraft" == "release not found" ]]; then | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| fi | |
| if [[ "$isDraft" == "true" ]]; then | |
| echo "draft=true" >> $GITHUB_OUTPUT | |
| fi | |
| working-directory: "release" | |
| - env: | |
| OUTPUTS_BRANCH: "${{ needs.shouldRelease.outputs.branch }}" | |
| OUTPUTS_PR_NUMBER: "${{ needs.shouldRelease.outputs.prNumber }}" | |
| OUTPUTS_TOKEN: "${{ steps.get_github_app_token.outputs.token }}" | |
| SHA: "${{ needs.shouldRelease.outputs.sha }}" | |
| id: "release" | |
| if: "${{ !fromJSON(steps.check_release.outputs.exists) }}" | |
| name: "create release" | |
| run: | | |
| yarn install | |
| yarn exec -- release-please github-release \ | |
| --draft \ | |
| --release-type simple \ | |
| --repo-url "${{ env.RELEASE_REPO }}" \ | |
| --target-branch "$(echo $OUTPUTS_BRANCH | tr -d '"')" \ | |
| --token "$(echo $OUTPUTS_TOKEN | tr -d '"')" \ | |
| --shas-to-tag "$(echo $OUTPUTS_PR_NUMBER | tr -d '"'):$(echo ${SHA} | tr -d '"')" | |
| working-directory: "lib" | |
| - env: | |
| GH_TOKEN: "${{ steps.get_github_app_token.outputs.token }}" | |
| OUTPUTS_NAME: "${{ needs.shouldRelease.outputs.name }}" | |
| id: "upload" | |
| name: "upload artifacts" | |
| run: | | |
| gh release upload --clobber $(echo $OUTPUTS_NAME | tr -d '"') dist/* | |
| working-directory: "release" | |
| - env: | |
| path: "release/dist" | |
| if: "${{ fromJSON(env.PUBLISH_TO_GCS) }}" | |
| name: "release artifacts" | |
| run: | | |
| echo "downloading binaries to $(pwd)/dist" | |
| gcloud artifacts generic upload \ | |
| --project="grafanalabs-global" \ | |
| --repository="generic-${{ env.GAR_REPO_SLUG }}-prod" \ | |
| --location="us" \ | |
| --source-directory=${{ env.path }}, \ | |
| --package=binaries \ | |
| --version=${{ github.sha }} | |
| working-directory: "release" | |
| createReleaseBranch: | |
| needs: | |
| - "publishRelease" | |
| outputs: | |
| branchExists: "${{ steps.create_branch.outputs.branch_exists }}" | |
| branchName: "${{ steps.create_branch.outputs.branch_name }}" | |
| permissions: | |
| contents: "write" | |
| id-token: "write" | |
| runs-on: "ubuntu-x64" | |
| steps: | |
| - name: "pull code to release" | |
| uses: "actions/checkout@v4" | |
| with: | |
| path: "release" | |
| persist-credentials: false | |
| repository: "${{ env.RELEASE_REPO }}" | |
| - id: "extract_branch" | |
| name: "extract branch name" | |
| run: | | |
| echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| - id: "get_github_app_token" | |
| name: "get github app token" | |
| uses: "grafana/shared-workflows/actions/create-github-app-token@580590a644e82e79bb2598bdaba0be245a14dda0" | |
| with: | |
| github_app: "${{ env.GITHUB_APP }}" | |
| - env: | |
| GH_TOKEN: "${{ steps.get_github_app_token.outputs.token }}" | |
| OUTPUTS_BRANCH: "${{ steps.extract_branch.outputs.branch }}" | |
| OUTPUTS_NAME: "${{ needs.publishRelease.outputs.name }}" | |
| OUTPUTS_TOKEN: "${{ steps.get_github_app_token.outputs.token }}" | |
| VERSION: "${{ needs.publishRelease.outputs.name }}" | |
| id: "create_branch" | |
| name: "create release branch" | |
| run: | | |
| # Debug and clean the version variable | |
| echo "Original VERSION: $VERSION" | |
| # Remove all quotes (both single and double) | |
| VERSION=$(echo $VERSION | tr -d '"' | tr -d "'") | |
| echo "After removing quotes: $VERSION" | |
| # Extract version without the 'v' prefix if it exists | |
| VERSION="${VERSION#v}" | |
| echo "After removing v prefix: $VERSION" | |
| # Extract major and minor versions | |
| MAJOR=$(echo $VERSION | cut -d. -f1) | |
| MINOR=$(echo $VERSION | cut -d. -f2) | |
| echo "MAJOR: $MAJOR, MINOR: $MINOR" | |
| # Create branch name from template | |
| BRANCH_TEMPLATE="release-\${major}.\${minor}.x" | |
| BRANCH_NAME=${BRANCH_TEMPLATE//\$\{major\}/$MAJOR} | |
| BRANCH_NAME=${BRANCH_NAME//\$\{minor\}/$MINOR} | |
| echo "Checking if branch already exists: $BRANCH_NAME" | |
| # Check if branch exists | |
| if git ls-remote --heads origin $BRANCH_NAME | grep -q $BRANCH_NAME; then | |
| echo "Branch $BRANCH_NAME already exists, skipping creation" | |
| echo "branch_exists=true" >> $GITHUB_OUTPUT | |
| echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT | |
| else | |
| echo "Creating branch: $BRANCH_NAME from tag: $(echo $OUTPUTS_NAME | tr -d '"')" | |
| # Create branch from the tag | |
| git fetch --tags | |
| git checkout "$(echo $OUTPUTS_BRANCH | tr -d '"')" | |
| git checkout -b $BRANCH_NAME | |
| # explicity set the github app token to override the release branch protection | |
| git remote set-url origin "https://x-access-token:$(echo ${OUTPUTS_TOKEN} | tr -d '"')@github.com/${{ env.RELEASE_REPO }}" | |
| git push -u origin $BRANCH_NAME | |
| echo "branch_exists=false" >> $GITHUB_OUTPUT | |
| echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT | |
| fi | |
| working-directory: "release" | |
| publishDockerPlugins: | |
| needs: | |
| - "createRelease" | |
| permissions: | |
| id-token: "write" | |
| runs-on: "ubuntu-x64" | |
| steps: | |
| - name: "pull release library code" | |
| uses: "actions/checkout@v4" | |
| with: | |
| path: "lib" | |
| persist-credentials: false | |
| ref: "${{ env.RELEASE_LIB_REF }}" | |
| repository: "grafana/loki-release" | |
| - name: "pull code to release" | |
| uses: "actions/checkout@v4" | |
| with: | |
| path: "release" | |
| persist-credentials: false | |
| repository: "${{ env.RELEASE_REPO }}" | |
| - name: "Set up QEMU" | |
| uses: "docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392" | |
| - name: "set up docker buildx" | |
| uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" | |
| - name: "Login to DockerHub" | |
| uses: "grafana/shared-workflows/actions/dockerhub-login@ef3a62a3ca4c1a15505b4235a5a51493194da3c7" | |
| - name: "Login to GAR" | |
| uses: "grafana/shared-workflows/actions/login-to-gar@12c87e5aa323694c820c1ff3d8e47e8237e05136" | |
| - env: | |
| SHA: "${{ needs.createRelease.outputs.sha }}" | |
| name: "download and prepare plugins" | |
| run: | | |
| echo "downloading plugins to $(pwd)/plugins" | |
| gcloud artifacts generic download \ | |
| --project="grafanalabs-dev" \ | |
| --repository="generic-${{ env.GAR_REPO_SLUG }}-dev" \ | |
| --location="us" \ | |
| --package=plugins \ | |
| --version=$(echo ${SHA} | tr -d '"') \ | |
| --destination=plugins/ | |
| mkdir -p "release/clients/cmd/docker-driver" | |
| - name: "publish docker driver" | |
| uses: "./lib/actions/push-images" | |
| with: | |
| buildDir: "release/clients/cmd/docker-driver" | |
| imageDir: "plugins" | |
| imagePrefix: "${{ env.IMAGE_PREFIX }}" | |
| isLatest: "${{ needs.createRelease.outputs.isLatest }}" | |
| isPlugin: true | |
| publishImages: | |
| needs: | |
| - "createRelease" | |
| permissions: | |
| id-token: "write" | |
| runs-on: "ubuntu-x64" | |
| steps: | |
| - name: "pull release library code" | |
| uses: "actions/checkout@v4" | |
| with: | |
| path: "lib" | |
| persist-credentials: false | |
| ref: "${{ env.RELEASE_LIB_REF }}" | |
| repository: "grafana/loki-release" | |
| - name: "Set up QEMU" | |
| uses: "docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392" | |
| - name: "set up docker buildx" | |
| uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" | |
| - name: "Login to DockerHub" | |
| uses: "grafana/shared-workflows/actions/dockerhub-login@ef3a62a3ca4c1a15505b4235a5a51493194da3c7" | |
| - name: "Login to GAR" | |
| uses: "grafana/shared-workflows/actions/login-to-gar@12c87e5aa323694c820c1ff3d8e47e8237e05136" | |
| - env: | |
| SHA: "${{ needs.createRelease.outputs.sha }}" | |
| name: "download images" | |
| run: | | |
| echo "downloading images to $(pwd)/images" | |
| gcloud artifacts generic download \ | |
| --project="grafanalabs-dev" \ | |
| --repository="generic-${{ env.GAR_REPO_SLUG }}-dev" \ | |
| --location="us" \ | |
| --package=images \ | |
| --version=$(echo ${SHA} | tr -d '"') \ | |
| --destination=images/ | |
| - name: "publish docker images" | |
| uses: "./lib/actions/push-images" | |
| with: | |
| imageDir: "images" | |
| imagePrefix: "${{ env.IMAGE_PREFIX }}" | |
| isLatest: "${{ needs.createRelease.outputs.isLatest }}" | |
| publishRelease: | |
| needs: | |
| - "createRelease" | |
| - "publishImages" | |
| - "publishDockerPlugins" | |
| outputs: | |
| name: "${{ needs.createRelease.outputs.name }}" | |
| permissions: | |
| contents: "write" | |
| id-token: "write" | |
| runs-on: "ubuntu-x64" | |
| steps: | |
| - name: "pull code to release" | |
| uses: "actions/checkout@v4" | |
| with: | |
| path: "release" | |
| persist-credentials: false | |
| repository: "${{ env.RELEASE_REPO }}" | |
| - id: "get_github_app_token" | |
| name: "get github app token" | |
| uses: "grafana/shared-workflows/actions/create-github-app-token@580590a644e82e79bb2598bdaba0be245a14dda0" | |
| with: | |
| github_app: "${{ env.GITHUB_APP }}" | |
| - env: | |
| GH_TOKEN: "${{ steps.get_github_app_token.outputs.token }}" | |
| OUTPUTS_IS_LATEST: "${{ needs.createRelease.outputs.isLatest }}" | |
| OUTPUTS_NAME: "${{ needs.createRelease.outputs.name }}" | |
| if: "${{ !fromJSON(needs.createRelease.outputs.exists) || (needs.createRelease.outputs.draft && fromJSON(needs.createRelease.outputs.draft)) }}" | |
| name: "publish release" | |
| run: | | |
| gh release edit $(echo $OUTPUTS_NAME | tr -d '"') --draft=false --latest=$(echo $OUTPUTS_IS_LATEST | tr -d '"') | |
| working-directory: "release" | |
| shouldRelease: | |
| outputs: | |
| branch: "${{ steps.extract_branch.outputs.branch }}" | |
| isLatest: "${{ steps.should_release.outputs.isLatest }}" | |
| name: "${{ steps.should_release.outputs.name }}" | |
| prNumber: "${{ steps.should_release.outputs.prNumber }}" | |
| sha: "${{ steps.should_release.outputs.sha }}" | |
| shouldRelease: "${{ steps.should_release.outputs.shouldRelease }}" | |
| permissions: | |
| contents: "write" | |
| id-token: "write" | |
| pull-requests: "write" | |
| runs-on: "ubuntu-x64" | |
| steps: | |
| - name: "pull code to release" | |
| uses: "actions/checkout@v4" | |
| with: | |
| path: "release" | |
| persist-credentials: false | |
| repository: "${{ env.RELEASE_REPO }}" | |
| - name: "pull release library code" | |
| uses: "actions/checkout@v4" | |
| with: | |
| path: "lib" | |
| persist-credentials: false | |
| ref: "${{ env.RELEASE_LIB_REF }}" | |
| repository: "grafana/loki-release" | |
| - id: "extract_branch" | |
| name: "extract branch name" | |
| run: | | |
| echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| - id: "should_release" | |
| name: "should a release be created?" | |
| uses: "./lib/actions/should-release" | |
| with: | |
| baseBranch: "${{ steps.extract_branch.outputs.branch }}" | |
| name: "create release" | |
| "on": | |
| push: | |
| branches: | |
| - "release-[0-9]+.[0-9]+.x" | |
| - "k[0-9]+" | |
| - "main" | |
| permissions: | |
| contents: "read" | |
| pull-requests: "read" |