From ae60528cf42fb2205ab52ad9874f8070e03a1f49 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Thu, 8 Feb 2024 16:47:50 -0700 Subject: [PATCH] fix: fetch the correct repos --- .github/workflows/release.yml | 13 +++++++++---- workflows/lib/release.libsonnet | 5 +++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc6bfaa0..326eadde 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,11 +7,11 @@ jobs: - "shouldRelease" runs-on: "ubuntu-latest" steps: - - name: "pull code to release" + - name: "pull release library code" uses: "actions/checkout@v4" with: - path: "release" - repository: "${{ inputs.release_repo }}" + path: "lib" + repository: "grafana/loki-release" - name: "setup node" uses: "actions/setup-node@v4" with: @@ -42,7 +42,7 @@ jobs: --target-branch "${{ needs.shouldRelease.outputs.branch }}" \ --token="${{ secrets.GH_TOKEN }}" shell: "bash" - working-directory: "release" + working-directory: "lib" - env: GH_TOKEN: "${{ secrets.GH_TOKEN }}" id: "upload" @@ -98,6 +98,11 @@ jobs: shouldRelease: "${{ steps.should_release.outputs.shouldRelease }}" runs-on: "ubuntu-latest" steps: + - name: "pull code to release" + uses: "actions/checkout@v4" + with: + path: "release" + repository: "${{ inputs.release_repo }}" - name: "pull release library code" uses: "actions/checkout@v4" with: diff --git a/workflows/lib/release.libsonnet b/workflows/lib/release.libsonnet index e0592538..5ee951b0 100644 --- a/workflows/lib/release.libsonnet +++ b/workflows/lib/release.libsonnet @@ -44,6 +44,7 @@ local pullRequestFooter = 'Merging this PR will release the [artifacts](https:// shouldRelease: job.new() + job.withSteps([ + common.fetchReleaseRepo, common.fetchReleaseLib, common.extractBranchName, @@ -64,7 +65,7 @@ local pullRequestFooter = 'Merging this PR will release the [artifacts](https:// + job.withNeeds(['shouldRelease']) + job.withIf('${{ fromJSON(needs.shouldRelease.outputs.shouldRelease) }}') + job.withSteps([ - common.fetchReleaseRepo, + common.fetchReleaseLib, common.setupNode, common.googleAuth, common.setupGoogleCloudSdk, @@ -81,7 +82,7 @@ local pullRequestFooter = 'Merging this PR will release the [artifacts](https:// gsutil cp -r gs://loki-build-artifacts/${SHA}/dist . |||), - releaseStep('create release') + releaseLibStep('create release') + step.withId('release') + step.withRun(||| npm install