我想手动调用工作流程并让用户选择标签值作为该工作流程的输入
on:
workflow_dispatch:
inputs:
DEPLOY_VERSION:
description: 'Tag Version (0.0.1)'
required: true
ENV:
type: choice
description: 'Environment'
required: false
options:
- dev
- prodga
default: 'dev'
jobs:
deploy:
name: "Deploying ${{ github.event.inputs.DEPLOY_VERSION }} to ${{ github.event.inputs.ENV }} by ${{ github.actor }}"
runs-on: ubuntu-latest
steps:
- run: |
echo "Deploying ${{ github.event.inputs.DEPLOY_VERSION }}!"
echo "To ${{ github.event.inputs.ENV }}!"
Run Code Online (Sandbox Code Playgroud)
有没有一种方法可以获取包含 100 个最后一个标签的列表,而不是手动输入标签的值。或者对于 type: choice 选项必须是硬编码的?
我希望能够每5秒向顶级CPU消费者输出一个日志文件.这样我就可以在测试期间看到谁使用了大部分cpu.
我发现这个答案很常见:
$cpu = Get-Counter -ComputerName localhost "\Process(*)\% Processor Time" `
| Select-Object -ExpandProperty countersamples `
| where {$_.InstanceName -ne 'idle' } `
| where {$_.InstanceName -ne '_total' }`
| Select-Object -Property instancename, cookedvalue `
| Sort-Object -Property cookedvalue -Descending `
| Select-Object -First 5 `
| ft @{L='Date';E={Get-Date}}, InstanceName, @{L='CPU';E={(($_.Cookedvalue/100)/$NumberOfLogicalProcessors).toString('P')}} -HideTableHeaders `
| Format-Table -Auto | Out-String
Run Code Online (Sandbox Code Playgroud)
我有2个问题:
有时我得到:
获取计数器:其中一个性能计数器样本中的数据无效.查看每个PerformanceCounterSample对象的Status属性,以确保它包含有效数据.
我想获得完整的进程名称,而不是
java 25% idea64 0.8% ...
我试图更新作为字符串列表的项属性.只有在属性不存在时才能更新(追加)属性.list_append和if_not_exists的种类.
var params = {...
Run Code Online (Sandbox Code Playgroud)UpdateExpression:'SET friends = list_append(if_not_exists(friends,:empty_list),:new_friend)',
Run Code Online (Sandbox Code Playgroud)ExpressionAttributeValues:{ ":new_friend": [{"S":"Bobo"}], ":empty_list" :[] } };
这不行,有办法吗?因此,如果Bobo仍然不在我的"朋友"列表中,它会附加它