Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Mar 10, 2021
0 parents commit 0e9693b
Show file tree
Hide file tree
Showing 14 changed files with 653 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "org.apache.maven.plugins:maven-compiler-plugin"
5 changes: 5 additions & 0 deletions .github/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: Quarkiverse Extension
release:
current-version: 0
next-version: 0.0.1-SNAPSHOT

Binary file added .github/release/maven-settings.xml.gpg
Binary file not shown.
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build

on:
push:
branches:
- "main"
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'
pull_request:
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v2
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-repo-${{ runner.os }}-${{ steps.get-date.outputs.date }}

- name: Build with Maven
run: mvn -B formatter:validate verify --file pom.xml

25 changes: 25 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Quarkiverse Pre Release

on:
pull_request:
paths:
- '.github/project.yml'

jobs:
release:
runs-on: ubuntu-latest
name: pre release

steps:
- uses: radcortez/project-metadata-action@master
name: retrieve project metadata
id: metadata
with:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- name: Validate version
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
run: |
echo '::error::Cannot release a SNAPSHOT version.'
exit 1
53 changes: 53 additions & 0 deletions .github/workflows/quarkus-snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Quarkus ecosystem CI"
on:
workflow_dispatch:
watch:
types: [started]

# For this CI to work, ECOSYSTEM_CI_TOKEN needs to contain a GitHub with rights to close the Quarkus issue that the user/bot has opened,
# while 'ECOSYSTEM_CI_REPO_PATH' needs to be set to the corresponding path in the 'quarkusio/quarkus-ecosystem-ci' repository

env:
ECOSYSTEM_CI_REPO: quarkusio/quarkus-ecosystem-ci
ECOSYSTEM_CI_REPO_FILE: context.yaml
JAVA_VERSION: 11

#########################
# Repo specific setting #
#########################

ECOSYSTEM_CI_REPO_PATH: quarkus-<YOUR_REPOSITORY>

jobs:
build:
name: "Build against latest Quarkus snapshot"
runs-on: ubuntu-latest
# Allow <ADMIN> to manually launch the ecosystem CI in addition to the bots
if: github.actor == 'quarkusbot' || github.actor == 'quarkiversebot' || github.actor == '<ADMIN>'

steps:
- name: Install yq
run: sudo add-apt-repository ppa:rmescandon/yq && sudo apt update && sudo apt install yq -y

- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}

- name: Checkout repo
uses: actions/checkout@v2
with:
path: current-repo
ref: main

- name: Checkout Ecosystem
uses: actions/checkout@v2
with:
repository: ${{ env.ECOSYSTEM_CI_REPO }}
ref: main
path: ecosystem-ci

- name: Setup and Run Tests
run: ./ecosystem-ci/setup-and-test
env:
ECOSYSTEM_CI_TOKEN: ${{ secrets.ECOSYSTEM_CI_TOKEN }}
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Quarkiverse Release

on:
pull_request:
types: [closed]
paths:
- '.github/project.yml'

jobs:
release:
runs-on: ubuntu-latest
name: release
if: ${{github.event.pull_request.merged == true}}

steps:
- uses: radcortez/project-metadata-action@master
name: Retrieve project metadata
id: metadata
with:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- uses: actions/checkout@v2

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- uses: actions/[email protected]
with:
java-version: 11

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Configure Git author
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Maven release ${{steps.metadata.outputs.current-version}}
run: |
gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output maven-settings.xml .github/release/maven-settings.xml.gpg
git checkout -b release
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s maven-settings.xml
git checkout ${{github.base_ref}}
git rebase release
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease -s maven-settings.xml
- name: Push changes to ${{github.base_ref}}
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{github.base_ref}}

- name: Push tags
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Eclipse
.project
.classpath
.settings/
bin/

# IntelliJ
.idea
*.ipr
*.iml
*.iws

# NetBeans
nb-configuration.xml

# Visual Studio Code
.vscode
.factorypath

# OSX
.DS_Store

# Vim
*.swp
*.swo

# patch
*.orig
*.rej

# Gradle
.gradle/
build/

# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties
Loading

0 comments on commit 0e9693b

Please sign in to comment.