-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Tester å legge auth token for package installs som env var * Test auth token som env var * Test auth token som env var * Sett til master branch
- Loading branch information
1 parent
b5d917d
commit b62310d
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,9 @@ inputs: | |
github-token: | ||
description: "Token to use when signing into ghcr.io for cacheing purposes" | ||
required: true | ||
auth-token: | ||
description: "Token to use when installing packages from npm" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
|
@@ -73,14 +76,11 @@ runs: | |
# with: | ||
# image_ref: ${{ steps.login.outputs.registry }}/${{ github.repository }}/${{ inputs.bake-target }}@${{ steps.build_push.outputs.digest }} | ||
|
||
- name: Authenticate with private NPM package | ||
shell: bash | ||
run: echo "//npm.pkg.github.com/:_authToken=${{ inputs.github-token }}" > .npmrc | ||
|
||
- name: Build and push with bake | ||
uses: docker/bake-action@7a5dfed3550ca014665af2a27af8fc9d7284b9b3 # ratchet:docker/[email protected] | ||
env: | ||
CACHE_TAG: ${{ steps.generate-cache-tags.outputs.cache-tag }} | ||
PACKAGES_AUTH_TOKEN: ${{ inputs.auth-token }} | ||
with: | ||
no-cache: ${{ github.actor == 'dependabot[bot]' }} | ||
targets: ${{ inputs.bake-target }} | ||
|
@@ -90,3 +90,4 @@ runs: | |
${{ steps.meta.outputs.bake-file }} | ||
set: | | ||
*.platform=${{ inputs.bake-platform }} | ||
*.secrets=id=PACKAGES_AUTH_TOKEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters