Added many, many more actions.
This commit is contained in:
48
yq/yq-merge/action.yaml
Normal file
48
yq/yq-merge/action.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
name: yq-merge
|
||||
description: "Change the language format of a file."
|
||||
inputs:
|
||||
lhs:
|
||||
description: "Left-hand side of merge."
|
||||
required: true
|
||||
rhs:
|
||||
description: "Right-hand side of merge."
|
||||
required: true
|
||||
operator:
|
||||
description: "Merge operator. See: https://mikefarah.gitbook.io/yq/operators/multiply-merge"
|
||||
required: true
|
||||
default: "*+"
|
||||
element:
|
||||
description: "Element to merge."
|
||||
required: true
|
||||
default: "."
|
||||
tmpDir:
|
||||
description: "Temporary directory. Default: _tmp"
|
||||
required: true
|
||||
default: _tmp
|
||||
outputs:
|
||||
result:
|
||||
description: "The converted file."
|
||||
value: ${{ steps.merge.outputs.console }}
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: "Make temporary file of first input."
|
||||
id: lhs
|
||||
uses: act/common/utils/mktemp@master
|
||||
with:
|
||||
input: ${{ inputs.lhs }}
|
||||
tmpDir: ${{ inputs.tmpDir }}
|
||||
- name: "Make temporary file of second input."
|
||||
id: rhs
|
||||
uses: act/common/utils/mktemp@master
|
||||
with:
|
||||
input: ${{ inputs.rhs }}
|
||||
tmpDir: ${{ inputs.tmpDir }}
|
||||
- name: "Merge files."
|
||||
id: merge
|
||||
uses: act/common/yq/yq@master
|
||||
with:
|
||||
command: "'${{ inputs.element }} ${{ inputs.operator }} load(\"${{ steps.rhs.outputs.tmp }}\")' '${{ steps.lhs.outputs.tmp }}'"
|
||||
- name: "Remove temporary files."
|
||||
run: rm -rf "${{ inputs.tmpDir }}"
|
||||
shell: bash
|
||||
Reference in New Issue
Block a user