From 0d177b023ea4d0c772799c08e183183a346f5e99 Mon Sep 17 00:00:00 2001 From: Daniel von Atzigen Date: Wed, 17 Apr 2024 16:43:22 +0200 Subject: [PATCH] Make GITHUB_TOKEN an input for `create-image` action --- .github/actions/create-image/action.yaml | 5 ++++- .github/workflows/build.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/create-image/action.yaml b/.github/actions/create-image/action.yaml index f607a6fd..62955900 100644 --- a/.github/actions/create-image/action.yaml +++ b/.github/actions/create-image/action.yaml @@ -10,6 +10,9 @@ inputs: DOCKERFILE: description: 'The path to the Dockerfile' required: true + GITHUB_TOKEN: + description: 'The github token' + required: true runs: using: 'composite' @@ -41,7 +44,7 @@ runs: with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ inputs.GITHUB_TOKEN }} - name: Build and push Docker image uses: docker/build-push-action@v5 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa2b6333..e095aa2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -114,6 +114,7 @@ jobs: IMAGE_NAME: ${{ vars.BASE_IMAGE_NAME }}-app TAG: edge DOCKERFILE: ./apps/client-asset-sg/docker/Dockerfile + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build_and_push_api: name: 'build and push api' @@ -130,6 +131,7 @@ jobs: IMAGE_NAME: ${{ vars.BASE_IMAGE_NAME }}-api TAG: edge DOCKERFILE: ./apps/server-asset-sg/docker/Dockerfile + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} tag_edge_commit: name: 'tag edge commit'