Skip to content

Commit

Permalink
build: add job Update Dependency Graph (#1400)
Browse files Browse the repository at this point in the history
Signed-off-by: FabioPinheiro <[email protected]>
  • Loading branch information
FabioPinheiro authored Oct 24, 2024
1 parent b6a895b commit d5821d0
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/sbt-dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# See https://github.com/marketplace/actions/sbt-dependency-submission
name: Update Dependency Graph
on:
# push:
# branches:
# - master # default branch of the project
schedule:
- cron: "0 20 * * *"
workflow_dispatch:
jobs:
dependency-graph:
name: Update Dependency Graph
runs-on: ubuntu-latest # or windows-latest, or macOS-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java and Scala
uses: olafurpg/setup-scala@v14
with:
java-version: [email protected]
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18" # or whatever
# - name: Setup Scala.JS
# uses: japgolly/setup-scalajs@v1
- name: Cache sbt
uses: coursier/[email protected]
# - name: npm install
# run: npm install
- uses: scalacenter/sbt-dependency-submission@v2
with:
working-directory: ./
modules-ignore:
root_3
shared-test
polluxanoncredstest_3
# predef_3
# mercury-agent-didcommx_3
# identus-cloud-agent_3
# mercury-protocol-coordinate-mediation_3
# pollux-sql-doobie_3
# mercury-protocol-outofband-login_3
# connect-sql-doobie_3
# shared
# pollux-core_3
# pollux-sd-jwt_3
# shared-json
# pollux-vc-jwt_3
# mercury-agent-core_3
# mercury-protocol-connection_3
# mercury-protocol-present-proof_3
# castor-core_3
# connect-core_3
# mercury-protocol-trust-ping_3
# shared-crypto
# mercury-protocol-report-problem_3
# pollux-prex_3
# mercury-data-models_3
# mercury-resolver_3
# mercury-protocol-issue-credential_3
# pollux-anoncreds_3
# mercury-protocol-routing-2-0_3
# mercury-verifiable-credentials_3
# mercury-protocol-did-exchange_3
# mercury-protocol-revocation-notification_3
# mercury-protocol-invitation_3
# event-notification_3
# prism-node-client_3
# cloud-agent-wallet-api_3
configs-ignore: test scala-tool scala-doc-tool
12 changes: 12 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,15 @@ if (sys.env.get("GITHUB_TOKEN").isDefined) {
Defaults.sbtPluginExtra(dependency, sbtV, scalaV)
}
} else libraryDependencies ++= Seq[ModuleID]()

// See file in .github/workflows/sbt-dependency-submission.yml
if (sys.env.get("DEPEDABOT").isDefined) {
println(s"Adding plugin sbt-github-dependency-submission since env DEPEDABOT is defined.")
// The reason for this is that the plugin needs the variable to be defined. We don't want to have that requirement.
libraryDependencies += {
val dependency = "ch.epfl.scala" % "sbt-github-dependency-submission" % "3.1.0"
val sbtV = (pluginCrossBuild / sbtBinaryVersion).value
val scalaV = (update / scalaBinaryVersion).value
Defaults.sbtPluginExtra(dependency, sbtV, scalaV)
}
} else libraryDependencies ++= Seq[ModuleID]()

0 comments on commit d5821d0

Please sign in to comment.