diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 12b9f91..888e313 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: echo "REPO=$GITHUB_REPOSITORY" >> $GITHUB_ENV echo "OWNER=$GITHUB_REPOSITORY_OWNER" >> $GITHUB_ENV - - name: Check version is used. + - name: Check if version is used run: | URL=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/latest LATEST=$(curl --silent "$URL" | jq -r .name) @@ -45,9 +45,6 @@ jobs: exit 1 fi - - name: Build - run: ./gradlew build --no-daemon -Dquarkus.package.type=native -Dquarkus.native.container-build=true - - name: Generating self-signed certificate run: | openssl req \ @@ -60,6 +57,9 @@ jobs: -out cert.pem \ -subj "/C=US/ST=SC/L=Hometown/O=IT/emailAddress=root@localhost/CN=localhost" + - name: Build + run: ./gradlew build --no-daemon -Dquarkus.package.type=native -Dquarkus.native.container-build=true + - name: Login to DockerHub uses: docker/login-action@v2 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29a8278..4d6d05e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,5 +18,17 @@ jobs: java-version: '17' cache: 'gradle' + - name: Generating self-signed certificate + run: | + openssl req \ + -newkey rsa:2048 \ + -new \ + -nodes \ + -x509 \ + -days 2 \ + -keyout key.pem \ + -out cert.pem \ + -subj "/CN=localhost" + - name: Tests run: ./gradlew test --no-daemon