Skip to content

Commit 59bae86

Browse files
committed
Ny workflow for å bygge artifakter i main
1 parent 5b00e52 commit 59bae86

File tree

4 files changed

+65
-2
lines changed

4 files changed

+65
-2
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: "Authenticate Node"
2+
description: "Suthenticate with github node npm"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: "Authenticate to npm"
7+
uses: actions/setup-node@v4
8+
with:
9+
registry-url: "https://npm.pkg.github.com"

.github/actions/build/action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Build artifact"
2+
description: "Build artifact(s) of your packages in the current project"
3+
inputs:
4+
devhub:
5+
description: "Username or alias of the Dev Hub org."
6+
default: "devhub"
7+
required: true
8+
runs:
9+
using: composite
10+
steps:
11+
- name: "Build package"
12+
shell: bash
13+
run: |
14+
sfp build --devhubalias ${{ inputs.devhub }} --diffcheck --buildnumber ${GITHUB_RUN_ID} --branch ${GITHUB_REF#refs/heads/}

.github/actions/ciValidate/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ inputs:
3232
runs:
3333
using: composite
3434
steps:
35-
- uses: actions/checkout@v4
36-
3735
- name: validate
3836
shell: bash
3937
run: |
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "MAIN - Build and Publish"
2+
on:
3+
workflow_run:
4+
workflows: ["ciStaticCodeValidation"]
5+
branches:
6+
- "main"
7+
jobs:
8+
buildAndPublish:
9+
runs-on: ubuntu-latest
10+
container: ghcr.io/flxbl-io/sfp:latest
11+
permissions:
12+
contents: write
13+
packages: write
14+
steps:
15+
- name: "Checkout"
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- uses: navikt/sf-platform/.github/actions/authenticateNode@main
21+
22+
- uses: navikt/sf-platform/.github/actions/authenticateOrg@main
23+
with:
24+
auth-url: ${{ secrets.SF_DEVHUB_URL }}
25+
alias: "devhub"
26+
setDefaultDevhubUsername: "true"
27+
28+
- uses: navikt/sf-platform/.github/actions/ciValidate@main
29+
with:
30+
devhub: "devhub"
31+
pools: "ci"
32+
33+
- uses: navikt/sf-platform/.github/actions/ciQuickBuild@main
34+
35+
- uses: navikt/sf-platform/.github/actions/build@main
36+
37+
- uses: navikt/sf-platform/.github/actions/uploadWorkflowArtifactsAndLogs@main
38+
with:
39+
artifactName: "build-artifacts"
40+
uploadArtifacts: true
41+
logName: "build-logs"
42+
publishLogs: true

0 commit comments

Comments
 (0)