-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update actions to their most recent version
- Loading branch information
Showing
3 changed files
with
41 additions
and
48 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
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 |
---|---|---|
|
@@ -18,30 +18,36 @@ env: | |
|
||
ECOSYSTEM_CI_REPO_PATH: quarkiverse-artemis | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
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 | ||
uses: dcarbone/install[email protected] | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: ${{ env.JAVA_VERSION }} | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
path: current-repo | ||
|
||
- name: Checkout Ecosystem | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ env.ECOSYSTEM_CI_REPO }} | ||
path: ecosystem-ci | ||
|
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 |
---|---|---|
|
@@ -6,6 +6,14 @@ on: | |
paths: | ||
- '.github/project.yml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
@@ -20,68 +28,47 @@ jobs: | |
github-token: ${{secrets.GITHUB_TOKEN}} | ||
metadata-file-path: '.github/project.yml' | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v3 | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: 'maven' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
|
||
- 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: Update latest release version in docs | ||
run: | | ||
mvn -B -ntp -pl docs -am generate-resources -Denforcer.skip -Dformatter.skip -Dimpsort.skip | ||
if ! git diff --quiet docs/modules/ROOT/pages/includes/attributes.adoc; then | ||
git add docs/modules/ROOT/pages/includes/attributes.adoc | ||
git commit -m "Update the latest release version ${{steps.metadata.outputs.current-version}} in documentation" | ||
fi | ||
- name: Maven release ${{steps.metadata.outputs.current-version}} | ||
run: | | ||
git checkout -b release | ||
./mvnw -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} | ||
git commit -am "Update stable version for documentation" | ||
git checkout ${{github.base_ref}} | ||
git rebase release | ||
./mvnw -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease | ||
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} | ||
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
|
||
- name: Adjust tag for documentation changes | ||
- name: Push changes to ${{github.base_ref}} branch | ||
run: | | ||
git checkout ${{steps.metadata.outputs.current-version}} | ||
./mvnw -B clean install -DskipTests -DskipITs | ||
git commit -am "Update stable version for documentation" | ||
# Move the tag after inclusion of documentation adjustments | ||
git tag -f ${{steps.metadata.outputs.current-version}} | ||
# Go back to original branch | ||
git checkout - | ||
- 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 | ||
branch: ${{github.base_ref}} | ||
git push | ||
git push origin ${{steps.metadata.outputs.current-version}} |