Skip to content

Commit

Permalink
github action updates
Browse files Browse the repository at this point in the history
  • Loading branch information
soletsdev committed Sep 27, 2024
1 parent d40f4cf commit 8a908b0
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 24 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
14 changes: 7 additions & 7 deletions .github/workflows/ci-api-build.and.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ on:
jobs:
quality_profile:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

defaults:
run:
working-directory: api

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: oracle
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Run unit tests
run: mvn -f pom.xml clean package
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@0.12.0
uses: aquasecurity/trivy-action@0.24.0
with:
scan-type: 'fs'
ignore-unfixed: true
Expand All @@ -49,11 +49,11 @@ 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
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/deploy-to.openshift-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ on:
jobs:
build-and-deploy-dev:
name: Build and deploy to OpenShift DEV
# ubuntu-20.04 can also be used.
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: dev

outputs:
Expand All @@ -64,7 +63,7 @@ jobs:

steps:
- name: Check for required secrets
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const secrets = {
Expand Down Expand Up @@ -98,14 +97,14 @@ jobs:
core.info(`✅ All the required secrets are set`);
}
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Determine image tags
if: env.IMAGE_TAGS == ''
run: |
echo "IMAGE_TAGS=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: ${{ env.DOCKER_ARTIFACTORY_REPO }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}
Expand Down Expand Up @@ -143,7 +142,7 @@ jobs:
oc: 4

# https://github.com/redhat-actions/oc-login#readme
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Deploy API
run: |
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/deploy-to.openshift-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ on:
jobs:
openshift-ci-cd:
name: Deploy to OpenShift PROD
# ubuntu-20.04 can also be used.
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: production

outputs:
Expand All @@ -58,7 +57,7 @@ jobs:

steps:
- name: Check for required secrets
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const secrets = {
Expand Down Expand Up @@ -96,7 +95,7 @@ jobs:
}

- 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 All @@ -108,7 +107,7 @@ jobs:
oc: 4

# https://github.com/redhat-actions/oc-login#readme
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Deploy API
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-to.openshift-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ on:
jobs:
deploy-test:
name: Deploy to OpenShift TEST
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: test

outputs:
Expand All @@ -65,7 +65,7 @@ jobs:

steps:
- name: Check for required secrets
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const secrets = {
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
}
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install oc
uses: redhat-actions/openshift-tools-installer@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tag-create.git.and.imagestream.tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:

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

- name: Create tag
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
Expand All @@ -52,7 +52,7 @@ jobs:
oc: 4

# https://github.com/redhat-actions/oc-login#readme
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Tag in OpenShift
run: |
set -eux
Expand Down

0 comments on commit 8a908b0

Please sign in to comment.