Skip to content

Commit

Permalink
Merge pull request #91 from mfnalex/dependency-graph-only-on-push
Browse files Browse the repository at this point in the history
moved dependency-graph into separate file that only runs on push, not PR
  • Loading branch information
mfnalex authored Feb 10, 2024
2 parents 38aa2e4 + 3c8b1f1 commit 41575f0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 32 deletions.
33 changes: 1 addition & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Build and Test

on:
Expand Down Expand Up @@ -32,10 +25,6 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0

# - name: Run ktltintCheck
# run: ./gradlew ktlintCheck --scan
# continue-on-error: true

- name: Build with Gradle Wrapper
run: ./gradlew build distribution --scan

Expand All @@ -48,24 +37,4 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: basics-${{ env.PROJECT_VERSION }}
path: build/dist/basics-${{ env.PROJECT_VERSION }}/*

dependency-submission:

runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0
path: build/dist/basics-${{ env.PROJECT_VERSION }}/*
25 changes: 25 additions & 0 deletions .github/workflows/dependency-graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Update Dependency graph

on:
push:
branches: [ "main" ]

jobs:

dependency-submission:

runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0

0 comments on commit 41575f0

Please sign in to comment.