Skip to content

Commit

Permalink
Add a github action for sops
Browse files Browse the repository at this point in the history
If implemented, this code will enable flux packages to use this action to run sops
commands.

Signed-off-by: Soule BA <[email protected]>
  • Loading branch information
souleb committed Jan 19, 2022
1 parent 637ff54 commit 8c36cc8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- uses: ./actions/kustomize
- uses: ./actions/helm
- uses: ./actions/kubebuilder
- uses: ./actions/sops
- uses: ./actions/sbom
with:
image: ghcr.io/fluxcd/kustomize-controller:v0.19.1
Expand Down
25 changes: 25 additions & 0 deletions actions/sops/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Setup SOPS
description: A GitHub Action for running sops commands
author: Soule BA
branding:
color: blue
icon: command
inputs:
version:
description: "strict semver"
required: true
default: "3.7.1"
runs:
using: composite
steps:
- name: "Download and copy the binary to /usr/local/bin"
shell: bash
run: |
VERSION=${{ inputs.version }}
REPO_URL=https://github.com/mozilla/sops/releases/download
BIN_URL="${REPO_URL}/v${VERSION}/sops-v${VERSION}.linux"
curl -fL --no-progress-meter ${BIN_URL} -o /tmp/sops
chmod +x /tmp/sops
sudo mv /tmp/sops /usr/local/bin
which sops
sops --version

0 comments on commit 8c36cc8

Please sign in to comment.