Skip to content

Commit f172f14

Browse files
authored
Merge pull request #3 from fjtirado/repo-setup
adding gha workflows
2 parents 22ec518 + 93483a0 commit f172f14

File tree

5 files changed

+224
-0
lines changed

5 files changed

+224
-0
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "maven"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
12+
ignore:
13+
- dependency-name: "org.apache.maven.plugins:maven-compiler-plugin"

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
paths-ignore:
8+
- '.gitignore'
9+
- 'CODEOWNERS'
10+
- 'LICENSE'
11+
- '*.md'
12+
- '*.adoc'
13+
- '*.txt'
14+
- '.all-contributorsrc'
15+
pull_request:
16+
paths-ignore:
17+
- '.gitignore'
18+
- 'CODEOWNERS'
19+
- 'LICENSE'
20+
- '*.md'
21+
- '*.adoc'
22+
- '*.txt'
23+
- '.all-contributorsrc'
24+
25+
jobs:
26+
build:
27+
name: Build on ${{ matrix.os }}
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
# os: [windows-latest, macos-latest, ubuntu-latest]
32+
os: [ubuntu-latest]
33+
runs-on: ${{ matrix.os }}
34+
steps:
35+
- name: Prepare git
36+
run: git config --global core.autocrlf false
37+
if: startsWith(matrix.os, 'windows')
38+
39+
- uses: actions/checkout@v3
40+
- name: Set up JDK 11
41+
uses: actions/setup-java@v3
42+
with:
43+
distribution: temurin
44+
java-version: 11
45+
cache: 'maven'
46+
47+
- name: Build with Maven
48+
run: mvn -B formatter:validate clean install --file pom.xml

.github/workflows/pre-release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Quarkiverse Pre Release
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/project.yml'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
name: pre release
12+
13+
steps:
14+
- uses: radcortez/project-metadata-action@master
15+
name: retrieve project metadata
16+
id: metadata
17+
with:
18+
github-token: ${{secrets.GITHUB_TOKEN}}
19+
metadata-file-path: '.github/project.yml'
20+
21+
- name: Validate version
22+
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
23+
run: |
24+
echo '::error::Cannot release a SNAPSHOT version.'
25+
exit 1
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: "Quarkus ecosystem CI"
2+
on:
3+
workflow_dispatch:
4+
watch:
5+
types: [started]
6+
7+
# 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,
8+
# while 'ECOSYSTEM_CI_REPO_PATH' needs to be set to the corresponding path in the 'quarkusio/quarkus-ecosystem-ci' repository
9+
10+
env:
11+
ECOSYSTEM_CI_REPO: quarkusio/quarkus-ecosystem-ci
12+
ECOSYSTEM_CI_REPO_FILE: context.yaml
13+
JAVA_VERSION: 11
14+
15+
#########################
16+
# Repo specific setting #
17+
#########################
18+
19+
ECOSYSTEM_CI_REPO_PATH: quarkiverse-asyncapi
20+
21+
jobs:
22+
build:
23+
name: "Build against latest Quarkus snapshot"
24+
runs-on: ubuntu-latest
25+
# Allow <ADMIN> to manually launch the ecosystem CI in addition to the bots
26+
if: github.actor == 'quarkusbot' || github.actor == 'quarkiversebot' || github.actor == '<ADMIN>'
27+
28+
steps:
29+
- name: Install yq
30+
uses: dcarbone/install-yq-action@v1.0.1
31+
32+
- name: Set up Java
33+
uses: actions/setup-java@v3
34+
with:
35+
distribution: temurin
36+
java-version: ${{ env.JAVA_VERSION }}
37+
38+
- name: Checkout repo
39+
uses: actions/checkout@v3
40+
with:
41+
path: current-repo
42+
43+
- name: Checkout Ecosystem
44+
uses: actions/checkout@v3
45+
with:
46+
repository: ${{ env.ECOSYSTEM_CI_REPO }}
47+
path: ecosystem-ci
48+
49+
- name: Setup and Run Tests
50+
run: ./ecosystem-ci/setup-and-test
51+
env:
52+
ECOSYSTEM_CI_TOKEN: ${{ secrets.ECOSYSTEM_CI_TOKEN }}

.github/workflows/release.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Quarkiverse Release
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
paths:
7+
- '.github/project.yml'
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
name: release
13+
if: ${{github.event.pull_request.merged == true}}
14+
15+
steps:
16+
- uses: radcortez/project-metadata-action@main
17+
name: Retrieve project metadata
18+
id: metadata
19+
with:
20+
github-token: ${{secrets.GITHUB_TOKEN}}
21+
metadata-file-path: '.github/project.yml'
22+
23+
- uses: actions/checkout@v3
24+
25+
- name: Import GPG key
26+
id: import_gpg
27+
uses: crazy-max/ghaction-import-gpg@v3
28+
with:
29+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
30+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
31+
32+
- name: Set up JDK 11
33+
uses: actions/setup-java@v3
34+
with:
35+
distribution: temurin
36+
java-version: 11
37+
cache: 'maven'
38+
server-id: ossrh
39+
server-username: MAVEN_USERNAME
40+
server-password: MAVEN_PASSWORD
41+
42+
- name: Configure Git author
43+
run: |
44+
git config --local user.email "action@github.com"
45+
git config --local user.name "GitHub Action"
46+
47+
- name: Maven release ${{steps.metadata.outputs.current-version}}
48+
run: |
49+
git checkout -b release
50+
mvn -B release:prepare -Prelease -DpreparationGoals="clean install" -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
51+
if ! git diff --quiet docs/modules/ROOT/pages/includes/attributes.adoc; then
52+
git add docs/modules/ROOT/pages/includes/attributes.adoc
53+
git commit -m "Update stable version for documentation"
54+
fi
55+
git checkout ${{github.base_ref}}
56+
git rebase release
57+
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
58+
env:
59+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
60+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
61+
62+
- name: Adjust tag for documentation changes
63+
run: |
64+
git checkout ${{steps.metadata.outputs.current-version}}
65+
mvn -B clean install -DskipTests -DskipITs
66+
if ! git diff --quiet docs/modules/ROOT/pages/includes/attributes.adoc; then
67+
git add docs/modules/ROOT/pages/includes/attributes.adoc
68+
git commit -m "Update stable version for documentation"
69+
# Move the tag after inclusion of documentation adjustments
70+
git tag -f ${{steps.metadata.outputs.current-version}}
71+
fi
72+
# Go back to base branch
73+
git checkout ${{github.base_ref}}
74+
75+
- name: Push changes to ${{github.base_ref}}
76+
uses: ad-m/github-push-action@v0.6.0
77+
with:
78+
github_token: ${{ secrets.GITHUB_TOKEN }}
79+
branch: ${{github.base_ref}}
80+
81+
- name: Push tags
82+
uses: ad-m/github-push-action@v0.6.0
83+
with:
84+
github_token: ${{ secrets.GITHUB_TOKEN }}
85+
tags: true
86+
branch: ${{github.base_ref}}

0 commit comments

Comments
 (0)