Skip to content

Update README.md

Update README.md #617

Workflow file for this run

name: cybr-cli CI
on:
push:
branches-ignore:
- main
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.16'
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
env:
PAS_HOSTNAME: ${{ secrets.PAS_HOSTNAME }}
CCP_CLIENT_CERT: ${{ secrets.CCP_CLIENT_CERT }}
CCP_CLIENT_PRIVATE_KEY: ${{ secrets.CCP_CLIENT_PRIVATE_KEY }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '>=1.16'
cache: false
- name: Import Secrets using CyberArk Conjur Secret Fetcher
uses: infamousjoeg/conjur-action@v2.0.4
with:
url: ${{ secrets.CONJUR_URL }}
account: ${{ secrets.CONJUR_ACCOUNT }}
host_id: ${{ secrets.CONJUR_HOST_ID }}
api_key: ${{ secrets.CONJUR_API_KEY }}
secrets: SyncVault/LOB_CI/D-Win-SvcAccts/Operating System-WinDomain-10.0.4.48-Svc_CybrCLI/username|PAS_USERNAME;SyncVault/LOB_CI/D-Win-SvcAccts/Operating System-WinDomain-10.0.4.48-Svc_CybrCLI/password|PAS_PASSWORD
- name: Debug Step
run: |
echo $PAS_USERNAME " " $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 ./...
build:
name: Build Binaries
runs-on: ubuntu-latest
needs:
- lint
- test
defaults:
run:
shell: bash
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64]
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '>=1.16'
cache: false
- name: Get current date & time
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d_%H%M%S')"
- name: Export GO111MODULE environment variable
run: export GO111MODULE=on
- name: Create ./bin/ directory
run: mkdir -p bin
- name: Fix x/sys Issues
run: go get -u golang.org/x/sys
- name: Build Binaries
run: |
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ./bin/${{ matrix.goos }}_cybr .
- name: Build Docker Container Package
run: |
docker build -t nfmsjoeg/cybr-cli:$TAG_NAME .
docker save nfmsjoeg/cybr-cli:$TAG_NAME > ./bin/docker_authenticator.tar
env:
TAG_NAME: alpha-${{ steps.date.outputs.date }}
- name: Upload Artifacts to Workflow
if: always()
uses: actions/upload-artifact@v2
with:
name: Release Executables
path: |
./bin/*_cybr*