Skip to content

Commit

Permalink
Merge pull request #513 from bcgov/security/GRAD2-2991-sonar
Browse files Browse the repository at this point in the history
git actions change.
  • Loading branch information
sumathi-thirumani authored Jan 23, 2025
2 parents ded9fd6 + ea22fbf commit af1e010
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.choice }}

Expand All @@ -63,7 +63,7 @@ jobs:
echo "TAG=latest ${GITHUB_SHA::12}" | tee -a $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ vars.DOCKER_ARTIFACTORY_REPO }}
username: ${{ vars.DOCKER_ARTIFACTORY_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.from.main.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Determine image tags
if: env.TAG == ''
run: |
echo "TAG=latest ${GITHUB_SHA::12}" | tee -a $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ vars.DOCKER_ARTIFACTORY_REPO }}
username: ${{ vars.DOCKER_ARTIFACTORY_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.from.release.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: grad-release

Expand All @@ -58,7 +58,7 @@ jobs:
echo "TAG=latest ${GITHUB_SHA::12}" | tee -a $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ vars.DOCKER_ARTIFACTORY_REPO }}
username: ${{ vars.DOCKER_ARTIFACTORY_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create tag
uses: actions/github-script@v7
Expand All @@ -54,7 +54,7 @@ jobs:
oc: 4

# https://github.com/redhat-actions/oc-login#readme
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Tag in OpenShift
run: |
set -eux
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get latest tag
uses: actions-ecosystem/action-get-latest-tag@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get latest tag
uses: actions-ecosystem/action-get-latest-tag@v1
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/on.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ jobs:
working-directory: api

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 18
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 18
- uses: actions/cache@v1
with:
Expand All @@ -42,7 +43,7 @@ jobs:
severity: 'CRITICAL'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
- name: Cache SonarCloud packages
Expand Down

0 comments on commit af1e010

Please sign in to comment.