mirror of https://github.com/aya-rs/aya
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
228 lines
6.6 KiB
Plaintext
228 lines
6.6 KiB
Plaintext
use cicd/services/github::replicateContextsWithInputs
|
|
use cicd/services/github::runAction
|
|
use javascript::JavaScriptEngine
|
|
use log/logger::Logger
|
|
use std/data/string_map::StringMap
|
|
use std/data/string_map::|entry
|
|
use std/data/string_map::|map
|
|
use std/ops/option::|wrap
|
|
|
|
#[github_action(actions/checkout@v5)]
|
|
#[generated(true)]
|
|
treatment checkout[contexts: JavaScriptEngine, logger: Logger](
|
|
var clean: string = "true",
|
|
var fetch_depth: string = "1",
|
|
var fetch_tags: string = "false",
|
|
var filter: string = "",
|
|
var github_server_url: string = "",
|
|
var lfs: string = "false",
|
|
var path: string = "",
|
|
var persist_credentials: string = "true",
|
|
var ref: string = "",
|
|
var repository: string = "${{ github.repository }}",
|
|
var set_safe_directory: string = "true",
|
|
var show_progress: string = "true",
|
|
var sparse_checkout: string = "",
|
|
var sparse_checkout_cone_mode: string = "true",
|
|
var ssh_key: string = "",
|
|
var ssh_known_hosts: string = "",
|
|
var ssh_strict: string = "true",
|
|
var ssh_user: string = "git",
|
|
var submodules: string = "false",
|
|
var token: string = "${{ github.token }}"
|
|
)
|
|
input post_trigger: Block<void>
|
|
input trigger: Block<void>
|
|
output completed: Block<void>
|
|
output continue: Block<void>
|
|
output failed: Block<void>
|
|
output post_completed: Block<void>
|
|
model node_contexts: JavaScriptEngine()
|
|
{
|
|
mainAction: runAction[contexts = node_contexts, logger = logger](
|
|
commands = "node .melodium-ci/github/actions/third/actions/checkout/ref_v5/dist/index.js",
|
|
env = |wrap<StringMap>(
|
|
|map(
|
|
[|entry(
|
|
"INPUT_REPOSITORY",
|
|
repository
|
|
),
|
|
|entry(
|
|
"INPUT_REF",
|
|
ref
|
|
),
|
|
|entry(
|
|
"INPUT_TOKEN",
|
|
token
|
|
),
|
|
|entry(
|
|
"INPUT_SSH-KEY",
|
|
ssh_key
|
|
),
|
|
|entry(
|
|
"INPUT_SSH-KNOWN-HOSTS",
|
|
ssh_known_hosts
|
|
),
|
|
|entry(
|
|
"INPUT_SSH-STRICT",
|
|
ssh_strict
|
|
),
|
|
|entry(
|
|
"INPUT_SSH-USER",
|
|
ssh_user
|
|
),
|
|
|entry(
|
|
"INPUT_PERSIST-CREDENTIALS",
|
|
persist_credentials
|
|
),
|
|
|entry(
|
|
"INPUT_PATH",
|
|
path
|
|
),
|
|
|entry(
|
|
"INPUT_CLEAN",
|
|
clean
|
|
),
|
|
|entry(
|
|
"INPUT_FILTER",
|
|
filter
|
|
),
|
|
|entry(
|
|
"INPUT_SPARSE-CHECKOUT",
|
|
sparse_checkout
|
|
),
|
|
|entry(
|
|
"INPUT_SPARSE-CHECKOUT-CONE-MODE",
|
|
sparse_checkout_cone_mode
|
|
),
|
|
|entry(
|
|
"INPUT_FETCH-DEPTH",
|
|
fetch_depth
|
|
),
|
|
|entry(
|
|
"INPUT_FETCH-TAGS",
|
|
fetch_tags
|
|
),
|
|
|entry(
|
|
"INPUT_SHOW-PROGRESS",
|
|
show_progress
|
|
),
|
|
|entry(
|
|
"INPUT_LFS",
|
|
lfs
|
|
),
|
|
|entry(
|
|
"INPUT_SUBMODULES",
|
|
submodules
|
|
),
|
|
|entry(
|
|
"INPUT_SET-SAFE-DIRECTORY",
|
|
set_safe_directory
|
|
),
|
|
|entry(
|
|
"INPUT_GITHUB-SERVER-URL",
|
|
github_server_url
|
|
)]
|
|
)
|
|
),
|
|
name = "checkout"
|
|
)
|
|
postAction: runAction[contexts = node_contexts, logger = logger](
|
|
commands = "node .melodium-ci/github/actions/third/actions/checkout/ref_v5/dist/index.js",
|
|
name = "post:checkout"
|
|
)
|
|
replicateContextsWithInputs[action_contexts = node_contexts, main_contexts = contexts](
|
|
inputs = |map(
|
|
[|entry(
|
|
"repository",
|
|
repository
|
|
),
|
|
|entry(
|
|
"ref",
|
|
ref
|
|
),
|
|
|entry(
|
|
"token",
|
|
token
|
|
),
|
|
|entry(
|
|
"ssh-key",
|
|
ssh_key
|
|
),
|
|
|entry(
|
|
"ssh-known-hosts",
|
|
ssh_known_hosts
|
|
),
|
|
|entry(
|
|
"ssh-strict",
|
|
ssh_strict
|
|
),
|
|
|entry(
|
|
"ssh-user",
|
|
ssh_user
|
|
),
|
|
|entry(
|
|
"persist-credentials",
|
|
persist_credentials
|
|
),
|
|
|entry(
|
|
"path",
|
|
path
|
|
),
|
|
|entry(
|
|
"clean",
|
|
clean
|
|
),
|
|
|entry(
|
|
"filter",
|
|
filter
|
|
),
|
|
|entry(
|
|
"sparse-checkout",
|
|
sparse_checkout
|
|
),
|
|
|entry(
|
|
"sparse-checkout-cone-mode",
|
|
sparse_checkout_cone_mode
|
|
),
|
|
|entry(
|
|
"fetch-depth",
|
|
fetch_depth
|
|
),
|
|
|entry(
|
|
"fetch-tags",
|
|
fetch_tags
|
|
),
|
|
|entry(
|
|
"show-progress",
|
|
show_progress
|
|
),
|
|
|entry(
|
|
"lfs",
|
|
lfs
|
|
),
|
|
|entry(
|
|
"submodules",
|
|
submodules
|
|
),
|
|
|entry(
|
|
"set-safe-directory",
|
|
set_safe_directory
|
|
),
|
|
|entry(
|
|
"github-server-url",
|
|
github_server_url
|
|
)]
|
|
)
|
|
)
|
|
|
|
Self.post_trigger -> postAction.trigger
|
|
postAction.completed -> Self.post_completed
|
|
Self.trigger -> replicateContextsWithInputs.trigger
|
|
replicateContextsWithInputs.ready -> mainAction.trigger
|
|
mainAction.completed -> Self.completed
|
|
mainAction.failed -> Self.failed
|
|
mainAction.continue -> Self.continue
|
|
}
|
|
|