diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index ec0bd4d5..fc699a26 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -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 diff --git a/actions/sops/action.yaml b/actions/sops/action.yaml new file mode 100644 index 00000000..9f00bc80 --- /dev/null +++ b/actions/sops/action.yaml @@ -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 \ No newline at end of file