-
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.
Ny workflow for å bygge artifakter i main
- Loading branch information
Showing
4 changed files
with
65 additions
and
2 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,9 @@ | ||
name: "Authenticate Node" | ||
description: "Suthenticate with github node npm" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Authenticate to npm" | ||
uses: actions/setup-node@v4 | ||
with: | ||
registry-url: "https://npm.pkg.github.com" |
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,14 @@ | ||
name: "Build artifact" | ||
description: "Build artifact(s) of your packages in the current project" | ||
inputs: | ||
devhub: | ||
description: "Username or alias of the Dev Hub org." | ||
default: "devhub" | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: "Build package" | ||
shell: bash | ||
run: | | ||
sfp build --devhubalias ${{ inputs.devhub }} --diffcheck --buildnumber ${GITHUB_RUN_ID} --branch ${GITHUB_REF#refs/heads/} |
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
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,42 @@ | ||
name: "MAIN - Build and Publish" | ||
on: | ||
workflow_run: | ||
workflows: ["ciStaticCodeValidation"] | ||
branches: | ||
- "main" | ||
jobs: | ||
buildAndPublish: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/flxbl-io/sfp:latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: navikt/sf-platform/.github/actions/authenticateNode@main | ||
|
||
- uses: navikt/sf-platform/.github/actions/authenticateOrg@main | ||
with: | ||
auth-url: ${{ secrets.SF_DEVHUB_URL }} | ||
alias: "devhub" | ||
setDefaultDevhubUsername: "true" | ||
|
||
- uses: navikt/sf-platform/.github/actions/ciValidate@main | ||
with: | ||
devhub: "devhub" | ||
pools: "ci" | ||
|
||
- uses: navikt/sf-platform/.github/actions/ciQuickBuild@main | ||
|
||
- uses: navikt/sf-platform/.github/actions/build@main | ||
|
||
- uses: navikt/sf-platform/.github/actions/uploadWorkflowArtifactsAndLogs@main | ||
with: | ||
artifactName: "build-artifacts" | ||
uploadArtifacts: true | ||
logName: "build-logs" | ||
publishLogs: true |