Skip to content

Commit

Permalink
unite actions
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed Jul 16, 2024
1 parent a78b896 commit b334e14
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 42 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,15 @@ jobs:
- name: Checkout Source
uses: actions/checkout@v4

- uses: jfrog/jfrog-cli/.github/common-steps/install-go-with-cache

- name: Static Code Analysis
uses: golangci/golangci-lint-action@v4
with:
args: |
--timeout 5m --out-${NO_FUTURE}format colored-line-number --enable errcheck,gosimple,govet,ineffassign,staticcheck,typecheck,unused,gocritic,asasalint,asciicheck,errchkjson,exportloopref,forcetypeassert,makezero,nilerr,unparam,unconvert,wastedassign,usestdlibvars
- uses: jfrog/.github/.github/actions/install-go-with-cache

- uses: jfrog/.github/.github/actions/golangci-lint
Go-Sec:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4

- uses: jfrog/jfrog-cli/.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/install-go-with-cache

- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: -exclude G204,G301,G302,G304,G306 -tests -exclude-dir \.*test\.* ./...
- uses: jfrog/.github/.github/actions/gosec-scanner
25 changes: 4 additions & 21 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,9 @@ jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-regex-match@v2
id: sign-or-recheck
- uses: jfrog/.github/.github/actions/cla
with:
text: ${{ github.event.comment.body }}
regex: '\s*(I have read the CLA Document and I hereby sign the CLA)|(recheck)\s*'

- name: "CLA Assistant"
if: ${{ steps.sign-or-recheck.outputs.match != '' || github.event_name == 'pull_request_target' }}
# Alpha Release
uses: cla-assistant/[email protected]
env:
# Generated and maintained by GitHub
event_comment_body: ${{ github.event.comment.body }}
event_name: ${{ github.event_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# JFrog organization secret
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_SIGN_TOKEN }}
with:
path-to-signatures: 'signed_clas.json'
path-to-document: 'https://jfrog.com/cla/'
remote-organization-name: 'jfrog'
remote-repository-name: 'jfrog-signed-clas'
# branch should not be protected
branch: 'master'
allowlist: bot*
CLA_SIGN_TOKEN: ${{ secrets.CLA_SIGN_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/frogbot-scan-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# "frogbot" GitHub environment can approve the pull request to be scanned.
environment: frogbot
steps:
- uses: jfrog/jfrog-cli/.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/install-go-with-cache

- uses: jfrog/frogbot@v2
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frogbot-scan-repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
# The repository scanning will be triggered periodically on the following branches.
branch: [ "dev" ]
steps:
- uses: jfrog/jfrog-cli/.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/install-go-with-cache

- uses: jfrog/frogbot@v2
env:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: jfrog/jfrog-cli/.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/install-go-with-cache

- name: Lint
run: go vet -v ./...
Expand All @@ -49,9 +49,9 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: jfrog/jfrog-cli/.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/install-go-with-cache

- uses: jfrog/jfrog-cli/.github/common-steps/install-local-artifactory
- uses: jfrog/.github/.github/actions/install-local-artifactory
with:
RTLIC: ${{ secrets.RTLIC }}

Expand All @@ -73,7 +73,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: jfrog/jfrog-cli/.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/install-go-with-cache

- name: ${{ matrix.suite }} tests
run: go test -v github.com/jfrog/jfrog-client-go/tests --timeout 0 --test.${{ matrix.suite }} --rt.url=${{ secrets.PLATFORM_URL }}/artifactory --ds.url=${{ secrets.PLATFORM_URL }}/distribution --xr.url=${{ secrets.PLATFORM_URL }}/xray --xsc.url=${{ secrets.PLATFORM_URL }}/xsc --access.url=${{ secrets.PLATFORM_URL }}/access --rt.user=${{ secrets.PLATFORM_USER }} --rt.password=${{ secrets.PLATFORM_PASSWORD }} --access.token=${{ secrets.PLATFORM_ADMIN_TOKEN }} --ci.runId=${{ runner.os }}-${{ matrix.suite }}
Expand All @@ -88,7 +88,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: jfrog/jfrog-cli/.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/install-go-with-cache

- name: pipelines tests
run: go test -v github.com/jfrog/jfrog-client-go/tests --timeout 0 --test.pipelines --rt.url=${{ secrets.PLATFORM_URL }}/artifactory --pipe.url=${{ secrets.PLATFORM_URL }}/pipelines --rt.user=${{ secrets.PLATFORM_USER }} --rt.password=${{ secrets.PLATFORM_PASSWORD }} --pipe.accessToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --pipe.vcsToken=${{ secrets.CLI_PIPE_VCS_TOKEN }} --pipe.vcsRepo=${{ secrets.CLI_PIPE_VCS_REPO }} --pipe.vcsBranch=${{ secrets.CLI_PIPE_VCS_BRANCH }} --ci.runId=${{ runner.os }}_pipe
Expand All @@ -103,9 +103,9 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: jfrog/jfrog-cli/.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/install-go-with-cache

- uses: jfrog/jfrog-cli/.github/common-steps/install-local-artifactory
- uses: jfrog/.github/.github/actions/install-local-artifactory
with:
RTLIC: ${{ secrets.RTLIC }}

Expand Down

0 comments on commit b334e14

Please sign in to comment.