-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
94 additions
and
29 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "Build and publish artifact" | ||
description: "Build and publish an artifact to github npm registery" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: "Authenticate to npm" | ||
uses: actions/setup-node@v4 | ||
with: | ||
registry-url: "https://npm.pkg.github.com" | ||
|
||
- name: "Build package" | ||
shell: bash | ||
run: | | ||
sfp build --devhubalias devhub --diffcheck --buildnumber ${GITHUB_RUN_ID} --branch ${GITHUB_REF#refs/heads/} | ||
- name: "Publish" | ||
shell: bash | ||
run: | | ||
sfp publish --artifactdir artifacts --npm --scope @${{ github.repository_owner }} --gittag --pushgittag | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: navikt/sf-platform/.github/actions/uploadWorkflowArtifactsAndLogs@main | ||
with: | ||
artifactName: "build-artifacts" | ||
uploadArtifacts: true | ||
logName: "logs" | ||
publishLogs: true |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: "Upload workflow artifacts and logs" | ||
description: "Uploads logs and sfp generated artifacts to the workflow" | ||
inputs: | ||
artifactName: | ||
description: "Name of the artifact" | ||
required: true | ||
uploadArtifacts: | ||
description: "If true upload the artifacts" | ||
required: true | ||
logName: | ||
description: "Name of the logs" | ||
required: true | ||
publishLogs: | ||
description: "If true upload the flxbl logs" | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: "Publish artifacts" | ||
if: ${{ inputs.uploadArtifacts }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.logName }} | ||
path: artifacts | ||
retention-days: 10 | ||
|
||
# Upload Flxbl logs | ||
- name: "Publish logs" | ||
if: ${{ inputs.publishLogs }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: "${{ inputs.logName }}" | ||
path: .sfpowerscripts | ||
if-no-files-found: ignore | ||
retention-days: 1 |
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