Skip to content

Commit

Permalink
Adding the files and workflows to build the docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
danakim committed Nov 20, 2023
1 parent 60ecc96 commit c47559b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:

jobs:
deployment:
permissions:
packages: write
environment: deploy
runs-on: ubuntu-latest

Expand All @@ -30,4 +32,24 @@ jobs:
run: mvn --batch-mode deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.BUILD_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.BUILD_PASSWORD }}
MAVEN_PASSWORD: ${{ secrets.BUILD_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push the voot server image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64
push: true
tags: |
ghcr.io/openconext/openconext-voot/voot-server:${{ github.ref_name }}
3 changes: 3 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM eclipse-temurin:11-jdk-alpine
COPY target/*.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]

0 comments on commit c47559b

Please sign in to comment.