mirror of
https://github.com/OpenBankProject/API-Explorer.git
synced 2026-02-06 10:47:23 +00:00
container build and publish WIP
This commit is contained in:
parent
2d969ad836
commit
dccb942ba3
5
.github/Dockerfile_PreBuild
vendored
Normal file
5
.github/Dockerfile_PreBuild
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
FROM jetty:9.4-jre11-slim
|
||||
|
||||
# Copy OBP source code
|
||||
# Copy build artifact (.war file) into jetty from 'maven' stage.
|
||||
COPY /target/API_Explorer-1.0.war /var/lib/jetty/webapps/ROOT.war
|
||||
34
.github/workflows/build_package.yml
vendored
Normal file
34
.github/workflows/build_package.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: build and publish container
|
||||
|
||||
on: [push]
|
||||
env:
|
||||
## Sets environment variable
|
||||
DOCKER_HUB_ORGANIZATION: openbankproject
|
||||
DOCKER_HUB_REPOSITORY: api-explorer
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
cache: maven
|
||||
- name: Build with Maven
|
||||
run: |
|
||||
MAVEN_OPTS="-Xmx3G -Xss2m" mvn package
|
||||
- name: Build the Docker image
|
||||
run: |
|
||||
echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin docker.io
|
||||
docker build . --file .github/Dockerfile_PreBuild --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:latest --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:develop
|
||||
docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags
|
||||
echo docker done
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user