-
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
23 changed files
with
303 additions
and
107 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,25 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
# For all files | ||
[*] | ||
insert_final_newline = true | ||
tab_width = 2 | ||
|
||
[*.{props,targets,csproj}] | ||
tab_width = 4 | ||
|
||
[*.cs] | ||
tab_width = 4 | ||
|
||
# VSTHRD200: Use "Async" suffix for async methods | ||
dotnet_diagnostic.VSTHRD200.severity = none | ||
|
||
# SA1001: Commas should be spaced correctly | ||
dotnet_diagnostic.SA1001.severity = none | ||
|
||
# FAA0002: Replace Xunit assertion with Fluent Assertions equivalent | ||
dotnet_diagnostic.FAA0002.severity = none | ||
|
||
# CA1822: Mark members as static | ||
dotnet_diagnostic.CA1822.severity = none |
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,38 @@ | ||
import { $ } from "zx"; | ||
import yargs from "yargs"; | ||
import { hideBin } from "yargs/helpers"; | ||
import { getApp } from "./_meta.mts"; | ||
import * as actions from "@actions/core"; | ||
|
||
const argv = yargs(hideBin(process.argv)) | ||
.positional("name", { | ||
type: "string", | ||
required: true, | ||
}) | ||
.option("tag", { | ||
type: "string", | ||
}) | ||
.parse(); | ||
|
||
const app = getApp(argv.name); | ||
const tag = | ||
argv.tag || (process.env.GITHUB_SHA ?? "").substring(0, 7) || "latest"; | ||
|
||
if (!app.image) { | ||
throw new Error(`No image config found for ${app.name}`); | ||
} | ||
|
||
const imgCfg = app.image; | ||
if (imgCfg.type !== "dotnet") { | ||
throw new Error(`Unsupported image type (not implemented): ${imgCfg.type}`); | ||
} | ||
|
||
const source = imgCfg.source.replaceAll("\\", "/"); | ||
$.cwd = app.path; | ||
await $`dotnet publish ${source} --os linux-musl -t:PublishContainer -p:ContainerImageTag=${tag} -bl`.verbose( | ||
true | ||
); | ||
|
||
const fullImage = `ghcr.io/altinn/altinn-authorization-tmp/${imgCfg.name}:${tag}`; | ||
actions.setOutput("image", fullImage); | ||
actions.setOutput("tag", tag); |
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,3 @@ | ||
import { verticals } from "./_meta.mts"; | ||
|
||
console.log(verticals); |
This file was deleted.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.