diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 670740e5..ece477a4 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -13,7 +13,7 @@ services: target: /var/lib/postgresql/data restart: always file-storage: - image: verapdf/file-storage:latest + image: ghcr.io/verapdf/verapdf_file-storage:latest expose: - 8080 depends_on: @@ -47,7 +47,7 @@ services: restart: always job-service: - image: verapdf/job-service:latest + image: ghcr.io/verapdf/verapdf_job-service:latest expose: - 8080 depends_on: @@ -86,7 +86,7 @@ services: target: /var/lib/rabbitmq/ worker: - image: verapdf/worker:latest + image: ghcr.io/verapdf/verapdf_worker:latest restart: always depends_on: - job-service diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml new file mode 100644 index 00000000..f385c24f --- /dev/null +++ b/.github/workflows/docker-images.yml @@ -0,0 +1,63 @@ +name: Build with maven, create docker images and push to github registries. + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: '30 6,18 * * *' +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + WORKER_IMAGE_NAME: verapdf_worker + FILE_STORAGE_IMAGE_NAME: verapdf_file-storage + JOB_SERVICE_IMAGE_NAME: verapdf_job-service + + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Set up JDK 1.11 + uses: actions/setup-java@v1 + with: + java-version: 1.11 + + - name: Update gut submodule for veraPDF-validation-profiles + run: git submodule update --init --recursive + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Build file-storage-service Docker image + run: docker build ./local-storage-service/server -f "./local-storage-service/server/Dockerfile-dev" -t $REGISTRY/verapdf/$FILE_STORAGE_IMAGE_NAME:latest + + - name: Build job-service Docker image + run: docker build ./job-service/server -f "./job-service/server/Dockerfile-dev" -t $REGISTRY/verapdf/$JOB_SERVICE_IMAGE_NAME:latest + + - name: Build worker-service Docker image + run: docker build ./worker -f "./worker/Dockerfile-dev" -t $REGISTRY/verapdf/$WORKER_IMAGE_NAME:latest + + - name: Login into ${{ env.REGISTRY }} + uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push file-storage-service Docker images to the ${{ env.REGISTRY }} + run : docker push $REGISTRY/verapdf/$FILE_STORAGE_IMAGE_NAME:latest + + - name: Push job-service Docker images to the ${{ env.REGISTRY }} + run: docker push $REGISTRY/verapdf/$JOB_SERVICE_IMAGE_NAME:latest + + - name: Push worker Docker images to the ${{ env.REGISTRY }} + run: docker push $REGISTRY/verapdf/$WORKER_IMAGE_NAME:latest + diff --git a/.gitmodules b/.gitmodules index 06cdbb40..1b5dd217 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,4 @@ path = worker/src/main/resources/profiles/veraPDF-validation-profiles url = https://github.com/veraPDF/veraPDF-validation-profiles.git branch = integration + update = rebase diff --git a/worker/src/main/resources/profiles/veraPDF-validation-profiles b/worker/src/main/resources/profiles/veraPDF-validation-profiles index a4f3ee21..2acf0fc2 160000 --- a/worker/src/main/resources/profiles/veraPDF-validation-profiles +++ b/worker/src/main/resources/profiles/veraPDF-validation-profiles @@ -1 +1 @@ -Subproject commit a4f3ee211607e9ab1ec6b6ee1f05578f6e01dd4a +Subproject commit 2acf0fc2623561475fc0de50d7ef18e4e88ece7d