-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
31 lines (31 loc) · 921 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: 'Add masks for SOPS values'
description: 'This composite action reads all values of a specified SOPS file and adds them as masks to the current job.'
inputs:
sops-file:
description: 'Path to SOPS file'
required: true
sops-age-key:
description: 'The SOPS age key to use for decryption'
required: true
runs:
using: "composite"
steps:
- name: Setup age
uses: alessiodionisi/[email protected]
- run: age --version
shell: bash
- name: Sops Binary Installer
uses: mdgreenwald/[email protected]
- run: sops --version
shell: bash
- name: Add masks for sops values
env:
SOPS_AGE_KEY: ${{ inputs.sops-age-key }}
run: |
(
set +x
set -eo pipefail
sops -d ${{ inputs.sops-file }} | jq -c -r '.. | strings' | xargs -I{} echo "::add-mask::{}"
set +eo
)
shell: bash