diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 96aba358..4ef9d647 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,6 +7,8 @@ on: jobs: deployment: + permissions: + packages: write environment: deploy runs-on: ubuntu-latest @@ -31,3 +33,43 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.BUILD_USERNAME }} 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 mujina common image + uses: docker/build-push-action@v4 + with: + context: mujina-common + file: mujina-common/docker/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/openconext/openconext-mujina/mujina-common:${{ github.ref_name }} + + - name: Build and push the mujina idp image + uses: docker/build-push-action@v4 + with: + context: mujina-idp + file: mujina-idp/docker/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/openconext/openconext-mujina/mujina-idp:${{ github.ref_name }} + + - name: Build and push the mujina sp image + uses: docker/build-push-action@v4 + with: + context: mujina-sp + file: mujina-sp/docker/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/openconext/openconext-mujina/mujina-sp:${{ github.ref_name }} diff --git a/mujina-common/docker/Dockerfile b/mujina-common/docker/Dockerfile new file mode 100644 index 00000000..6db5b001 --- /dev/null +++ b/mujina-common/docker/Dockerfile @@ -0,0 +1,3 @@ +FROM eclipse-temurin:11-jdk-alpine +COPY target/*.jar app.jar +ENTRYPOINT ["java","-jar","/app.jar"] diff --git a/mujina-idp/docker/Dockerfile b/mujina-idp/docker/Dockerfile new file mode 100644 index 00000000..6db5b001 --- /dev/null +++ b/mujina-idp/docker/Dockerfile @@ -0,0 +1,3 @@ +FROM eclipse-temurin:11-jdk-alpine +COPY target/*.jar app.jar +ENTRYPOINT ["java","-jar","/app.jar"] diff --git a/mujina-sp/docker/Dockerfile b/mujina-sp/docker/Dockerfile new file mode 100644 index 00000000..6db5b001 --- /dev/null +++ b/mujina-sp/docker/Dockerfile @@ -0,0 +1,3 @@ +FROM eclipse-temurin:11-jdk-alpine +COPY target/*.jar app.jar +ENTRYPOINT ["java","-jar","/app.jar"]