diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index a7c8c5f..86a8591 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -20,6 +20,9 @@ inputs: ignore-linting-rules: required: false type: string + github-token: + required: true + type: string runs: using: "composite" @@ -35,7 +38,7 @@ runs: shellcheck --external-sources --exclude=SC2148 ./Dockerfile shell: bash - name: Log in to registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + run: echo "${{ inputs.github-token }}" | docker login ghcr.io -u $ --password-stdin shell: bash - name: Prepare image tag run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a539129..9379622 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,7 @@ jobs: docker-context: docker/tna-python dockerfile: Dockerfile ignore-linting-rules: DL3002,DL3006 + github-token: ${{ secrets.GITHUB_TOKEN }} python-root: name: Python (root) @@ -54,6 +55,7 @@ jobs: user-image: root dockerfile: Dockerfile ignore-linting-rules: DL3002,DL3006 + github-token: ${{ secrets.GITHUB_TOKEN }} python-django: name: Python Django @@ -69,6 +71,7 @@ jobs: base-image: ghcr.io/nationalarchives/tna-python docker-context: docker/tna-python-django dockerfile: Dockerfile + github-token: ${{ secrets.GITHUB_TOKEN }} python-django-root: name: Python Django (root) @@ -85,6 +88,7 @@ jobs: docker-context: docker/tna-python-django dockerfile: Dockerfile ignore-linting-rules: DL3002 + github-token: ${{ secrets.GITHUB_TOKEN }} python-dev: name: Python Dev @@ -101,3 +105,4 @@ jobs: docker-context: docker/tna-python-dev dockerfile: Dockerfile ignore-linting-rules: DL3002,DL3008 + github-token: ${{ secrets.GITHUB_TOKEN }}