Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unite all common GitHub action steps #973

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
unite actions
Signed-off-by: Michael Sverdlov <michaelsv@jfrog.com>
  • Loading branch information
sverdlov93 committed Jul 16, 2024
commit b334e14c5c13d1a852294eff9bf02c41b1a751e0
16 changes: 4 additions & 12 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
@@ -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
@@ -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/github-action@v2.3.0
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
@@ -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:
2 changes: 1 addition & 1 deletion .github/workflows/frogbot-scan-repository.yml
Original file line number Diff line number Diff line change
@@ -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:
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -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 ./...
@@ -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 }}

@@ -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 }}
@@ -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
@@ -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 }}

Loading