Skip to content

Commit

Permalink
Updating CI script.
Browse files Browse the repository at this point in the history
  • Loading branch information
edufolly committed Feb 12, 2024
1 parent 4942c4e commit aa8089b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 111 deletions.
86 changes: 0 additions & 86 deletions .github/workflows/dev-jib.yml

This file was deleted.

34 changes: 13 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [ main ]


jobs:
build:
name: Build
Expand All @@ -26,13 +25,13 @@ jobs:
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'

- name: Get Gradle Version
run: |
VERSION=$(grep 'version' build.gradle | cut -f 2 -d "'")
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "REPO=$GITHUB_REPOSITORY" >> $GITHUB_ENV
REPO=$(echo $GITHUB_REPOSITORY | cut -f 2 -d "/")
echo "REPO=$REPO" >> $GITHUB_ENV
echo "OWNER=$GITHUB_REPOSITORY_OWNER" >> $GITHUB_ENV
- name: Check if version is used
Expand All @@ -56,27 +55,20 @@ jobs:
-out cert.pem \
-subj "/C=US/ST=SC/L=Hometown/O=IT/emailAddress=root@localhost/CN=localhost"
- name: Build
- name: Test & Build
run: |
./gradlew build --no-daemon \
-Dquarkus.package.type=native \
-Dquarkus.native.container-build=true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.OWNER }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Docker Build & Push
uses: docker/build-push-action@v5
with:
push: true
context: .
file: src/main/docker/Dockerfile.native-micro
tags: |
${{ env.REPO }}:${{ env.VERSION }}
${{ env.REPO }}:latest
-Dquarkus.native.container-build=true \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.username=${{ env.OWNER }} \
-Dquarkus.container-image.password=${{ secrets.DOCKER_TOKEN }} \
-Dquarkus.container-image.group=${{ env.OWNER }} \
-Dquarkus.container-image.name=${{ env.REPO }} \
-Dquarkus.container-image.tag=t${{ env.VERSION }} \
-Dquarkus.container-image.additional-tags=test \
-Dquarkus.jib.platforms=linux/amd64,linux/arm64
- name: Creating GitHub Tag
uses: mathieudutour/[email protected]
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ jobs:
timeout-minutes: 20
steps:
- name: Code Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
cache: 'gradle'

- name: Generating self-signed certificate
run: |
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/resources/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>httpbucket</title>
Expand Down

0 comments on commit aa8089b

Please sign in to comment.