From 79759fa0acfce69b2eef834245534ce33b7b5c3f Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Sat, 20 Jul 2024 15:33:29 -0400 Subject: [PATCH] meta: store actions secrets in environment PR-URL: https://github.com/nodejs/node/pull/53930 Reviewed-By: Antoine du Hamel Reviewed-By: James M Snell --- .github/workflows/auto-start-ci.yml | 10 +++++++--- .github/workflows/commit-queue.yml | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml index c5c29881c85c68..15b35cea97b723 100644 --- a/.github/workflows/auto-start-ci.yml +++ b/.github/workflows/auto-start-ci.yml @@ -59,11 +59,15 @@ jobs: - name: Setup @node-core/utils run: | - ncu-config set username ${{ secrets.JENKINS_USER }} - ncu-config set token "${{ secrets.GH_USER_TOKEN }}" - ncu-config set jenkins_token ${{ secrets.JENKINS_TOKEN }} + ncu-config set username "$USERNAME" + ncu-config set token "$GH_TOKEN" + ncu-config set jenkins_token "$JENKINS_TOKEN" ncu-config set owner "${{ github.repository_owner }}" ncu-config set repo "$(echo ${{ github.repository }} | cut -d/ -f2)" + env: + USERNAME: ${{ secrets.JENKINS_USER }} + GH_TOKEN: ${{ secrets.GH_USER_TOKEN }} + JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }} - name: Start the CI run: ./tools/actions/start-ci.sh ${{ needs.get-prs-for-ci.outputs.numbers }} diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml index 04c91cb40dc663..9517c52f62a589 100644 --- a/.github/workflows/commit-queue.yml +++ b/.github/workflows/commit-queue.yml @@ -86,11 +86,15 @@ jobs: run: | ncu-config set branch ${GITHUB_REF_NAME} ncu-config set upstream origin - ncu-config set username "${{ secrets.GH_USER_NAME }}" - ncu-config set token "${{ secrets.GH_USER_TOKEN }}" - ncu-config set jenkins_token "${{ secrets.JENKINS_TOKEN }}" + ncu-config set username "$USERNAME" + ncu-config set token "$GH_TOKEN" + ncu-config set jenkins_token "$JENKINS_TOKEN" ncu-config set repo "${REPOSITORY}" ncu-config set owner "${OWNER}" + env: + USERNAME: ${{ secrets.JENKINS_USER }} + GH_TOKEN: ${{ secrets.GH_USER_TOKEN }} + JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }} - name: Start the Commit Queue run: ./tools/actions/commit-queue.sh ${{ env.OWNER }} ${{ env.REPOSITORY }} ${{ needs.get_mergeable_prs.outputs.numbers }}