From 5b79b19223bc35b9dc7bd5b10acf358c9b0a4986 Mon Sep 17 00:00:00 2001 From: Ksenia Vazhdaeva Date: Mon, 20 Jan 2025 12:01:15 +0700 Subject: [PATCH] Fix GitHub secrets in action --- .github/actions/get-environments/action.yml | 13 ++++++++++--- .github/workflows/deploy_multiple.yml | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/actions/get-environments/action.yml b/.github/actions/get-environments/action.yml index f867db0..5ff05cf 100644 --- a/.github/actions/get-environments/action.yml +++ b/.github/actions/get-environments/action.yml @@ -1,5 +1,12 @@ name: Environments -description: Extracts names of all environments in the repository +description: Extracts all environments in the GitHub repository +inputs: + token: + description: GitHub token + required: true + repository: + description: GitHub repository + required: true outputs: data: description: Array of environment names @@ -18,5 +25,5 @@ runs: echo "data=$DATA" >> $GITHUB_OUTPUT shell: bash env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_TOKEN: ${{ inputs.token }} + GITHUB_REPOSITORY: ${{ inputs.repository }} diff --git a/.github/workflows/deploy_multiple.yml b/.github/workflows/deploy_multiple.yml index 6c67de4..34e79bc 100644 --- a/.github/workflows/deploy_multiple.yml +++ b/.github/workflows/deploy_multiple.yml @@ -49,6 +49,9 @@ jobs: - name: Get environments id: environments uses: ./.github/actions/get-environments + with: + token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} execute: runs-on: ubuntu-latest needs: