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 f710a2d commit a650345
Show file tree
Hide file tree
Showing 21 changed files with 39 additions and 102 deletions.
19 changes: 0 additions & 19 deletions .github/common-steps/install-go-with-cache/action.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/common-steps/install-local-artifactory/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/accessTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- name: Run Access tests
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.access --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --ci.runId=${{ runner.os }}-access
21 changes: 8 additions & 13 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- name: Run Go vet
run: go vet -v ./...
Expand All @@ -35,27 +35,22 @@ jobs:
- name: Checkout Source
uses: actions/checkout@v4

- uses: ./.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/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:
name: Go-Sec ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4

- uses: ./.github/common-steps/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/install-go-with-cache

- uses: jfrog/.github/.github/actions/gosec-scanner

ShellCheck:
name: Shellcheck
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/artifactoryTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

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

Expand Down
25 changes: 4 additions & 21 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,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/distributionTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
os: [ ubuntu, windows, macos ]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: ./.github/common-steps/install-go-with-cache
- uses: jfrog/.github/.github/actions/install-go-with-cache

- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- name: Containerize Artifactory
run: |
Expand Down
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: ./.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: ./.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/goTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- name: Run Go tests
run: go test -v -timeout 0 --test.go --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --ci.runId=${{ runner.os }}-go
4 changes: 2 additions & 2 deletions .github/workflows/gradleTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
with:
gradle-version: ${{ matrix.gradle-version }}

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

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lifecycleTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- name: Run Lifecycle tests
run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.lifecycle --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --ci.runId=${{ runner.os }}-lifecycle
4 changes: 2 additions & 2 deletions .github/workflows/mavenTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- name: Setup Maven v3.8.8 for macOS
uses: stCarolas/[email protected]
with:
maven-version: 3.8.8
if: runner.os == 'macOS'

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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npmTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
with:
node-version: "16"

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

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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nugetTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
dotnet-version: "6.x"


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

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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pluginsTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/podmanTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- name: Run podman tests
run: go test -v -timeout 0 --test.podman --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }}
4 changes: 2 additions & 2 deletions .github/workflows/pythonTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
if: ${{ matrix.suite == 'pipenv' }}
run: python -m pip install pipenv

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

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scriptTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- name: Test install CLI - jf
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/transferTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- uses: ./.github/common-steps/install-local-artifactory
- uses: jfrog/.github/.github/actions/install-local-artifactory
with:
RTLIC: ${{ secrets.RTLIC }}
JFROG_HOME: ${{ runner.temp }}
Expand All @@ -47,9 +47,9 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

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

- uses: ./.github/common-steps/install-local-artifactory
- uses: jfrog/.github/.github/actions/install-local-artifactory
with:
RTLIC: ${{ secrets.RTLIC }}
JFROG_HOME: ${{ runner.temp }}
Expand Down

0 comments on commit a650345

Please sign in to comment.