Skip to content

Commit

Permalink
Merge pull request #1 from kubotal/feature/oidc
Browse files Browse the repository at this point in the history
Feature/OIDC
  • Loading branch information
idirze authored Mar 13, 2024
2 parents 6389761 + 1735de8 commit 8d6c351
Show file tree
Hide file tree
Showing 52 changed files with 3,973 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright $YEAR tosit.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto
*.java text
*.xml text
*.md text
12 changes: 12 additions & 0 deletions .github/actions/setup-git-bot/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://github.com/orgs/community/discussions/26560
name: Set up GitHub Actions git bot
description: Configure local git to push as GitHub Actions bot

runs:
using: composite
steps:
- name: Configure git 📦
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
shell: bash
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: ci

on:
push:
paths-ignore:
- "README.md"
- "release-please-config.json"
- ".release-please-manifest.json"

pull_request:
paths-ignore:
- "README.md"
- "release-please-config.json"
- ".release-please-manifest.json"

workflow_dispatch:

permissions:
contents: read

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
code-style:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4

- name: Set up JDK 11 📦
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
cache: 'maven'

- name: Codestyle check ✅
run: mvn -ntp clean spotless:check

test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4

- name: Set up JDK 11 📦
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'

- name: Run tests ✅
run: mvn -ntp test

74 changes: 74 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: release-please

on:
pull_request:
types:
- closed
branches:
- main

permissions:
contents: write
pull-requests: write

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }}
if: github.repository_owner == 'OKDP' && github.event.pull_request.merged == true
steps:
- uses: google-github-actions/release-please-action@v4
id: release-please

publish-maven-central:
runs-on: ubuntu-latest
needs: [release-please]
if: github.repository_owner == 'OKDP' && needs.release-please.outputs.release_created == 'true'
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Set up GitHub Actions git bot 📦
uses: ./.github/actions/setup-git-bot

- name: Set up JDK 11 📦
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
cache: 'maven'
check-latest: true
server-id: 'central'
server-username: CENTRAL_USERNAME
server-password: CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Publish the tag '${{ needs.release-please.outputs.tag_name }}' to maven central 📤
run: |
git checkout tags/${{ needs.release-please.outputs.tag_name }}
mvn clean deploy -Prelease -DskipTests
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}





36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
### IntelliJ IDEA ###
.idea
*.iml

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/


### Mac OS ###
.DS_Store

### vscode ###
.vscode/

### maven ###
target/
dependency-reduced-pom.xml

### Others
tmp/
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit 8d6c351

Please sign in to comment.