-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github actions workflow. Update docker-compose for new images.
- Loading branch information
1 parent
da77f66
commit b567917
Showing
4 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -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 <account>/<repo> | ||
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 | ||
|
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
Submodule veraPDF-validation-profiles
updated
13 files