From 1dcb05d665cbbe7a1e4d3a5baa85771f41904599 Mon Sep 17 00:00:00 2001 From: Are Almaas Date: Fri, 25 Oct 2024 12:08:57 +0200 Subject: [PATCH] cleanup --- .github/workflows/ci-cd-pull-request.yml | 9 +++++++-- ...workflow-get-latest-deployed-versions-from-github.yml | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd-pull-request.yml b/.github/workflows/ci-cd-pull-request.yml index cad6f9083..8b3567b9f 100644 --- a/.github/workflows/ci-cd-pull-request.yml +++ b/.github/workflows/ci-cd-pull-request.yml @@ -10,6 +10,9 @@ jobs: uses: ./.github/workflows/workflow-get-latest-deployed-versions-from-github.yml with: environment: test + secrets: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + mock-deployment: name: Mock Deployment @@ -25,13 +28,15 @@ jobs: name: Store Mock Versions needs: [mock-deployment] runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Set Mock Infra Version run: | - gh variable set LATEST_DEPLOYED_INFRA_VERSION "v1.0.0-mock" --repo ${{ github.repository }} --env test + gh variable set --env test LATEST_DEPLOYED_INFRA_VERSION "v1.0.0-mock" --repo ${{ github.repository }} - name: Set Mock Apps Version run: | - gh variable set LATEST_DEPLOYED_APPS_VERSION "v1.0.0-mock" --repo ${{ github.repository }} --env test + gh variable set --env test LATEST_DEPLOYED_APPS_VERSION "v1.0.0-mock" --repo ${{ github.repository }} verify-stored-versions: name: Verify Stored Versions diff --git a/.github/workflows/workflow-get-latest-deployed-versions-from-github.yml b/.github/workflows/workflow-get-latest-deployed-versions-from-github.yml index 42dc521b3..5c08a883d 100644 --- a/.github/workflows/workflow-get-latest-deployed-versions-from-github.yml +++ b/.github/workflows/workflow-get-latest-deployed-versions-from-github.yml @@ -7,6 +7,9 @@ on: description: "Environment to get latest deployed versions for (e.g., staging, prod, yt01)" required: true type: string + secrets: + GITHUB_TOKEN: + required: true outputs: infra_version_sha: description: "SHA of the latest deployed infrastructure version" @@ -19,6 +22,9 @@ jobs: get-versions: name: Get Latest Deployed Versions from GitHub Variables runs-on: ubuntu-latest + environment: ${{ inputs.environment }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} outputs: infra_version_sha: ${{ steps.get-infra-sha.outputs.sha }} apps_version_sha: ${{ steps.get-apps-sha.outputs.sha }}