-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add dependency review for java gradle dependencies (#114)
* feat: add dependency review for java gradle dependencies * chore: bump self-dependencies
- Loading branch information
Showing
17 changed files
with
177 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Dependency Review | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
java_version: | ||
type: string | ||
default: "17" | ||
description: Java version to use | ||
java_distribution: | ||
type: string | ||
default: "temurin" | ||
description: Java distribution to use | ||
secrets: | ||
ACTIONS_BOT_TOKEN: | ||
required: true | ||
|
||
# decrease from default read/write | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-submission: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to submit dependency graph | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | ||
with: | ||
disable-sudo: true | ||
egress-policy: block | ||
allowed-endpoints: > | ||
api.deps.dev:443 | ||
api.github.com:443 | ||
api.securityscorecards.dev:443 | ||
github.com:443 | ||
github-cloud.githubusercontent.com:443 | ||
*.gradle.org:443 | ||
repo.maven.apache.org:443 | ||
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
with: | ||
lfs: true | ||
persist-credentials: false | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- uses: epam/ai-dial-ci/actions/[email protected] | ||
with: | ||
java_version: ${{ inputs.java_version }} | ||
java_distribution: ${{ inputs.java_distribution }} | ||
- uses: gradle/actions/dependency-submission@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 | ||
env: | ||
GITHUB_DEPENDENCY_GRAPH_REF: "refs/heads/${{ github.event.pull_request.head.ref }}" | ||
GITHUB_DEPENDENCY_GRAPH_SHA: ${{ github.event.pull_request.head.sha }} | ||
- id: dependency-review | ||
uses: actions/dependency-review-action@4081bf99e2866ebe428fc0477b69eb4fcda7220a # v4.4.0 | ||
with: | ||
retry-on-snapshot-warnings: true | ||
retry-on-snapshot-warnings-timeout: 600 | ||
- if: ${{ steps.dependency-review.outputs.comment-content != null }} | ||
# Use separate action to comment because the original one can't do it without PR context | ||
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0 | ||
with: | ||
number: ${{ github.event.pull_request.number }} | ||
header: dependency-analysis | ||
message: ${{ steps.dependency-review.outputs.comment-content }} | ||
GITHUB_TOKEN: ${{ secrets.ACTIONS_BOT_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ jobs: | |
is_latest: ${{ steps.semantic_versioning.outputs.is_latest }} | ||
latest_tag: ${{ steps.semantic_versioning.outputs.latest_tag }} | ||
steps: | ||
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.9.5 | ||
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.10.0 | ||
id: semantic_versioning | ||
|
||
release: | ||
|
@@ -90,22 +90,22 @@ jobs: | |
- calculate_version | ||
- test | ||
steps: | ||
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.9.5 | ||
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.10.0 | ||
with: | ||
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }} | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
lfs: true | ||
token: ${{ secrets.ACTIONS_BOT_TOKEN }} | ||
- uses: epam/ai-dial-ci/actions/java_prepare@1.9.5 | ||
- uses: epam/ai-dial-ci/actions/java_prepare@1.10.0 | ||
with: | ||
java_version: ${{ inputs.java_version }} | ||
java_distribution: ${{ inputs.java_distribution }} | ||
- name: Set version | ||
shell: bash | ||
run: | | ||
sed -i -E "s/^([ \t]*version[ \t]*=[ \t]*)[\"'].*[\"']/\1\"${{ needs.calculate_version.outputs.next_version }}\"/g" build.gradle | ||
- uses: epam/ai-dial-ci/actions/build_docker@1.9.5 | ||
- uses: epam/ai-dial-ci/actions/build_docker@1.10.0 | ||
with: | ||
ghcr_username: ${{ github.actor }} | ||
ghcr_password: ${{ secrets.ACTIONS_BOT_TOKEN }} | ||
|
@@ -122,7 +122,8 @@ jobs: | |
${{ github.ref == 'refs/heads/development' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'development') || ''}} | ||
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}:{1}', env.IMAGE_NAME, 'latest') || ''}} | ||
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'latest') || ''}} | ||
- uses: epam/ai-dial-ci/actions/[email protected] | ||
- uses: gradle/actions/dependency-submission@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 | ||
- uses: epam/ai-dial-ci/actions/[email protected] | ||
with: | ||
tag_version: ${{ needs.calculate_version.outputs.next_version }} | ||
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.