-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP rename to tomcat webapp boilerplate
- Loading branch information
Showing
13 changed files
with
91 additions
and
11 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Publish Docker Image Workflow | ||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: {} | ||
jobs: | ||
publish-docker: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
name: Publish release Job | ||
steps: | ||
- name: Checkout latest code | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | ||
- uses: ./.github/actions/ci-setup | ||
name: Setup CI environment | ||
- name: Publish artifact Step | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# for com.vanniktech.maven.publish.SonatypeHost | ||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }} | ||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }} | ||
run: | | ||
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3 | cut -d "v" -f2-) # 1.0.0-dev.1 | ||
echo "New version: ${NEW_VERSION}" | ||
echo "Github username: ${GITHUB_ACTOR}" | ||
./gradlew -Pversion=${NEW_VERSION} publishAndReleaseToMavenCentral --no-configuration-cache | ||
./gradlew -Pversion=${NEW_VERSION} publishAllPublicationsToGitHubPackagesRepository | ||
steps: | ||
- name: Checkout latest code | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | ||
- name: Setup CI environment | ||
uses: ./.github/actions/ci-setup | ||
# build and deploy | ||
- name: Build project | ||
run: ./gradlew war | ||
# prepare tags | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
ghcr.io/gipo999/webapp-boilerplate | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=sha | ||
## DOCKER BUILD AND PUSH to GHCR | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{github.actor}} | ||
password: ${{secrets.GITHUB_TOKEN}} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,windows/amd64 | ||
push: true | ||
# tags: ghcr.io/${{ github.repository_owner }}/its-battistar-express:latest | ||
tags: ${{ steps.meta.outputs.tags }}, ghcr.io/${{ github.repository_owner }}/wepapp-boilerplate:latest | ||
labels: ${{ steps.meta.outputs.labels }} |
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
GET http://localhost:8080/webapp-boilerplate/app/base | ||
GET http://localhost:8080/tomcat-webapp-boilerplate/app/base | ||
|
||
--- | ||
POST http://localhost:8080/webapp-boilerplate/app/base/health | ||
POST http://localhost:8080/tomcat-webapp-boilerplate/app/base/health |
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