From 5f8bebba27e0b85f114d1efb68a7acb24cf47bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Guillot?= Date: Fri, 23 Feb 2024 09:41:50 +0100 Subject: [PATCH] Store secret as environment variable --- .github/workflows/ci.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8bf5b872..c2030362 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,6 +38,8 @@ jobs: - build if: github.event_name == 'pull_request' runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 with: @@ -49,12 +51,12 @@ jobs: with: registry: ghcr.io username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ env.GITHUB_TOKEN }} - uses: ./.github/actions/nx-affected-target with: target: container env: - INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + INPUT_GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }} test: runs-on: ubuntu-latest @@ -91,6 +93,8 @@ jobs: permissions: contents: read packages: write + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 with: @@ -102,10 +106,10 @@ jobs: with: registry: ghcr.io username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ env.GITHUB_TOKEN }} - uses: ./.github/actions/nx-affected-target with: target: container env: - INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + INPUT_GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }} INPUT_PUSH: true