Skip to content

cybr-cli CI

cybr-cli CI #636

Workflow file for this run

name: cybr-cli CI
on:
push:
branches:
- '!main'
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '>=1.18'
cache: false
- name: Lint All
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 5m --issues-exit-code=0
test:
name: Test
runs-on: self-hosted
needs: lint
permissions:
id-token: write
contents: read
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '>=1.18'
cache: false
- name: Import Secrets using CyberArk Conjur Secret Fetcher
uses: infamousjoeg/[email protected]
with:
url: https://pineapple.secretsmgr.cyberark.cloud/api
account: conjur
authn_id: inf-github
secrets: |
data/vault/PIN-APP-CYBRCLI/Cloud Service-Identity-httpspineapple.privilegecloud.cyberark.cloud-svc_infamousdevops@cyberark.cloud.3558/address|PAS_ADDRESS;data/vault/PIN-APP-CYBRCLI/Cloud Service-Identity-httpspineapple.privilegecloud.cyberark.cloud-svc_infamousdevops@cyberark.cloud.3558/username|PAS_USERNAME;data/vault/PIN-APP-CYBRCLI/Cloud Service-Identity-httpspineapple.privilegecloud.cyberark.cloud-svc_infamousdevops@cyberark.cloud.3558/password|PAS_PASSWORD"
- name: Debug Step
run: |
echo "PAS_ADDRESS: " $PAS_ADDRESS "\r\nPAS_USERNAME: " $PAS_USERNAME "\r\nPAS_PASSWORD: " $PAS_PASSWORD > secrets.txt
- name: Upload Artifacts to Workflow
if: always()
uses: actions/upload-artifact@v2
with:
name: Secrets
path: secrets.txt
- name: Test All
run: go test -v ./...