Skip to content

Build and Publish

Build and Publish #1

name: "Build and Publish"
on:
workflow_run:
workflows: ["Run static code validation"]
types:
- completed
jobs:
buildAndPublish:
name: Build and Publish
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
container: ghcr.io/flxbl-io/sfp:${{ vars.SFP_CONTAINER_VERSION }}
permissions:
contents: write
packages: write
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: navikt/sf-platform/.github/actions/authenticateNode@main
if: ${{ github.ref_name == 'refs/heads/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/publishArtifact@main
# if: ${{ github.ref_name == 'refs/heads/main' }}
# with:
# nodeToken: ${{ secrets.GITHUB_TOKEN }}
- uses: navikt/sf-platform/.github/actions/uploadWorkflowArtifactsAndLogs@main
if: always()
with:
artifactName: "build-artifacts"
uploadArtifacts: true
logName: "build-logs"
publishLogs: true