Skip to content

Commit

Permalink
Merge pull request #339 from gsmet/various-codestarts-fixes
Browse files Browse the repository at this point in the history
Various codestarts fixes
  • Loading branch information
gsmet authored Dec 13, 2024
2 parents 283dd91 + 4953395 commit 22161bd
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/includes/attributes.adoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
:quarkus-version: 3.17.0
:quarkus-version: 3.17.4
:quarkus-github-action-version: 2.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class CodestartTest {
@Test
void testContent() throws Throwable {
codestartTest.checkGeneratedSource("org.acme.MyAction");
codestartTest.assertThatGeneratedFileMatchSnapshot(Language.JAVA, "pom.xml");
codestartTest.assertThatGeneratedFile(Language.JAVA, "pom.xml").exists();
codestartTest.assertThatGeneratedFileMatchSnapshot(Language.JAVA, "README.md");
codestartTest.assertThatGeneratedFileMatchSnapshot(Language.JAVA, "action.yml");
codestartTest.assertThatGeneratedFileMatchSnapshot(Language.JAVA, "action.docker.yml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,25 @@ on:
pull_request:
branches: [ main ]

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven

- name: Build
run: ./mvnw -B clean verify -Dquarkus.package.type=uber-jar -Dquarkus.package.add-runner-suffix=false
run: |
# if the repository has been initialized with Windows, we need to set the permissions here
chmod 755 ./mvnw
./mvnw -B clean verify -Dquarkus.package.type=uber-jar -Dquarkus.package.add-runner-suffix=false
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

defaults:
run:
shell: bash

jobs:
build-and-push-action:
runs-on: ubuntu-latest
Expand All @@ -33,6 +37,8 @@ jobs:
- name: Build and publish action to Maven repository
shell: bash
run: |
# if the repository has been initialized with Windows, we need to set the permissions here
chmod 755 ./mvnw
./mvnw -B clean deploy -Dquarkus.package.type=uber-jar -Dquarkus.package.add-runner-suffix=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,25 @@ on:
pull_request:
branches: [ main ]

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven

- name: Build
run: ./mvnw -B clean verify -Dquarkus.package.type=uber-jar -Dquarkus.package.add-runner-suffix=false
run: |
# if the repository has been initialized with Windows, we need to set the permissions here
chmod 755 ./mvnw
./mvnw -B clean verify -Dquarkus.package.type=uber-jar -Dquarkus.package.add-runner-suffix=false
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

defaults:
run:
shell: bash

jobs:
build-and-push-action:
runs-on: ubuntu-latest
Expand All @@ -33,6 +37,8 @@ jobs:
- name: Build and publish action to Maven repository
shell: bash
run: |
# if the repository has been initialized with Windows, we need to set the permissions here
chmod 755 ./mvnw
./mvnw -B clean deploy -Dquarkus.package.type=uber-jar -Dquarkus.package.add-runner-suffix=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,34 @@ on:
pull_request:
branches: [ main ]

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK {java.version}
uses: actions/setup-java@v4
with:
java-version: {java.version}
distribution: temurin
{#if buildtool.cli == 'gradle'}
{#if buildtool.cli.contains('gradle')}
cache: gradle
{#else}
cache: maven
{/if}

{#if buildtool.cli.contains('gradle')}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

{/if}
- name: Build
{#if buildtool.cli == 'gradle'}
uses: eskatos/gradle-command-action@v1
with:
arguments: {buildtool.cmd.build-ci}
{#else}
run: {buildtool.cli} {buildtool.cmd.build-ci}
{/if}
run: |
# if the repository has been initialized with Windows, we need to set the permissions here
chmod 755 ./mvnw
{buildtool.cli} {buildtool.cmd.build-ci}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

defaults:
run:
shell: bash

jobs:
build-and-push-action:
runs-on: ubuntu-latest
Expand All @@ -33,6 +37,8 @@ jobs:
- name: Build and publish action to Maven repository
shell: bash
run: |
# if the repository has been initialized with Windows, we need to set the permissions here
chmod 755 ./mvnw
./mvnw -B clean deploy -Dquarkus.package.type=uber-jar -Dquarkus.package.add-runner-suffix=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ env:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

defaults:
run:
shell: bash

jobs:
build-and-push-image:
runs-on: ubuntu-latest
Expand All @@ -34,7 +38,10 @@ jobs:
cache: 'maven'

- name: Build native image
run: ./mvnw clean package -Dnative
run: |
# if the repository has been initialized with Windows, we need to set the permissions here
chmod 755 ./mvnw
./mvnw -B clean package -Dnative

- name: Log in to the Container registry
uses: docker/login-action@v1
Expand Down

0 comments on commit 22161bd

Please sign in to comment.