-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add plugin source and ci workflows (#1)
* feat: add existing source code Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io> * chore: clean old release log Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io> * ci: add ci workflows Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io> * chore: remove unused env key Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io> * chore: reset version.sbt Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io> --------- Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io>
- Loading branch information
patlo-iog
authored
Jun 12, 2024
1 parent
034786e
commit e69c1ac
Showing
22 changed files
with
7,895 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.bsp/ | ||
.idea/ | ||
target/ | ||
!target/*.jar | ||
node_modules/ |
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,67 @@ | ||
name: Release | ||
|
||
concurrency: | ||
group: release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
release-branch: | ||
required: false | ||
type: string | ||
default: "main" | ||
workflow_dispatch: | ||
inputs: | ||
release-branch: | ||
description: "Branch to release from" | ||
required: false | ||
default: "main" | ||
|
||
jobs: | ||
release: | ||
env: | ||
GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }} | ||
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Java and Scala | ||
uses: olafurpg/setup-scala@v14 | ||
with: | ||
java-version: openjdk@1.17 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
- name: Cache sbt | ||
uses: coursier/cache-action@v6.4 | ||
- uses: crazy-max/ghaction-import-gpg@v3 | ||
id: import_gpg | ||
with: | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
git-user-signingkey: true | ||
git-commit-gpgsign: true | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ env.GITHUB_ACTOR }} | ||
password: ${{ env.GITHUB_TOKEN }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Release | ||
env: | ||
GIT_AUTHOR_EMAIL: ${{ steps.import_gpg.outputs.email }} | ||
GIT_COMMITTER_EMAIL: ${{ steps.import_gpg.outputs.email }} | ||
GIT_AUTHOR_NAME: ${{ steps.import_gpg.outputs.name }} | ||
GIT_COMMITTER_NAME: ${{ steps.import_gpg.outputs.name }} | ||
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }} | ||
run: | | ||
npm install | ||
npx semantic-release |
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,27 @@ | ||
name: Unit tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
|
||
jobs: | ||
build-and-unit-tests: | ||
name: "Build and unit tests" | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.pull_request.title, '[skip ci]') }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Java and Scala | ||
uses: olafurpg/setup-scala@v14 | ||
with: | ||
java-version: openjdk@1.17 | ||
- name: Cache sbt | ||
uses: coursier/cache-action@v6.4 | ||
- name: Compile and test | ||
run: sbt compile test |
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,4 @@ | ||
.bsp/ | ||
.idea/ | ||
target/ | ||
node_modules/ |
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 @@ | ||
|
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,5 @@ | ||
FROM quay.io/keycloak/keycloak:23.0.7 | ||
COPY ./target/*.jar /opt/keycloak/providers/*.jar | ||
RUN ls /opt/keycloak/providers/ | ||
RUN /opt/keycloak/bin/kc.sh build | ||
ENTRYPOINT [ "/opt/keycloak/bin/kc.sh" ] |
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,45 @@ | ||
ThisBuild / organization := "org.hyperledger" | ||
ThisBuild / autoScalaLibrary := false | ||
ThisBuild / crossPaths := false | ||
|
||
val V = new { | ||
val keycloak = "23.0.7" | ||
} | ||
|
||
lazy val commonSettings = Seq( | ||
githubOwner := "patlo-iog", | ||
githubRepository := "identus-keycloak-plugins" | ||
) | ||
|
||
lazy val oid4vciPlugin = (project in file(".")) | ||
.settings(commonSettings) | ||
.settings( | ||
name := "identus-keycloak-oid4vci", | ||
libraryDependencies ++= Seq( | ||
"org.keycloak" % "keycloak-core" % V.keycloak % "provided", | ||
"org.keycloak" % "keycloak-common" % V.keycloak % "provided", | ||
"org.keycloak" % "keycloak-adapter-core" % V.keycloak % "provided", | ||
"org.keycloak" % "keycloak-saml-core" % V.keycloak % "provided", | ||
"org.keycloak" % "keycloak-saml-core-public" % V.keycloak % "provided", | ||
"org.keycloak" % "keycloak-server-spi" % V.keycloak % "provided", | ||
"org.keycloak" % "keycloak-server-spi-private" % V.keycloak % "provided", | ||
"org.keycloak" % "keycloak-services" % V.keycloak % "provided", | ||
) | ||
) | ||
|
||
lazy val root = (project in file("")).aggregate(oid4vciPlugin) | ||
|
||
// ############################ | ||
// #### Release process ##### | ||
// ############################ | ||
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations.* | ||
releaseProcess := Seq[ReleaseStep]( | ||
checkSnapshotDependencies, | ||
inquireVersions, | ||
runClean, | ||
runTest, | ||
setReleaseVersion, | ||
ReleaseStep(releaseStepTask(oid4vciPlugin / Compile / packageBin)), | ||
publishArtifacts, | ||
setNextVersion | ||
) |
Oops, something went wrong.