Skip to content

Commit

Permalink
YDA-5308: implement Docker build action in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
stsnel committed Aug 7, 2023
1 parent 05a952f commit a0f8066
Show file tree
Hide file tree
Showing 7 changed files with 288 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-push-image-davrods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: "Build DavRODS image and push it to registry"

on:
push:
branches:
- 'development'
- 'ci-test'
paths:
- 'docker/images/davrods/**'

jobs:
push-image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Check out Yoda repository
uses: actions/checkout@v3
with:
path: yoda
repository: UtrechtUniversity/yoda
ref: development

- name: Authenticate to the container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: yoda/docker/images/davrods
file: yoda/docker/images/davrods/Dockerfile
push: true
tags: ghcr.io/utrechtuniversity/davrods:dev-1.9
39 changes: 39 additions & 0 deletions .github/workflows/build-push-image-eus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: "Build EUS web server image and push it to registry"

on:
push:
branches:
- 'development'
- 'ci-test'
paths:
- 'docker/images/yoda_eus/**'

jobs:
push-image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Check out Yoda repository
uses: actions/checkout@v3
with:
path: yoda
repository: UtrechtUniversity/yoda
ref: development

- name: Authenticate to the container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: yoda/docker/images/yoda_eus
file: yoda/docker/images/yoda_eus/Dockerfile
push: true
tags: ghcr.io/utrechtuniversity/yoda-eus:dev-1.9
40 changes: 40 additions & 0 deletions .github/workflows/build-push-image-mailpit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: "Build mailpit image and push it to registry"

on:
push:
branches:
- 'development'
- 'ci-test'
paths:
- 'docker/images/mailpit/**'

jobs:
push-image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Check out Yoda repository
uses: actions/checkout@v3
with:
path: yoda
repository: UtrechtUniversity/yoda
ref: development

- name: Authenticate to the container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Use the manual build script rather than a regular build-push-action
# so that we don't have to duplicate version information across CI and
# the manual build script
- name: Build and push Docker image
run: |
cd yoda/docker/images/mailpit
./build.sh
docker push ghcr.io/utrechtuniversity/yoda-mailpit:dev-1.9
39 changes: 39 additions & 0 deletions .github/workflows/build-push-image-portal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: "Build portal image and push it to registry"

on:
push:
branches:
- 'development'
- 'ci-test'
paths:
- 'docker/images/yoda_portal/**'

jobs:
push-image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Check out Yoda repository
uses: actions/checkout@v3
with:
path: yoda
repository: UtrechtUniversity/yoda
ref: development

- name: Authenticate to the container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: yoda/docker/images/yoda_portal
file: yoda/docker/images/yoda_portal/Dockerfile
push: true
tags: ghcr.io/utrechtuniversity/yoda-portal:dev-1.9
47 changes: 47 additions & 0 deletions .github/workflows/build-push-image-provider.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: "Build Yoda iRODS provider image and push it to registry"

on:
push:
branches:
- 'development'
- 'ci-test'
paths:
- 'docker/images/yoda_irods_icat/**'
- 'roles/irods_completion/files/irods_completion.sh'
- 'roles/pam_python/files/pam_python.so'
- 'roles/yoda_rulesets/files/run-intake-movetovault.sh'

jobs:
push-image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Check out Yoda repository
uses: actions/checkout@v3
with:
path: yoda
repository: UtrechtUniversity/yoda
ref: development

- name: Authenticate to the container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Stage files for Docker image
run: |
cd yoda/docker/images/yoda_irods_icat
./stage-uploads.sh
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: yoda/docker/images/yoda_irods_icat
file: yoda/docker/images/yoda_irods_icat/Dockerfile
push: true
tags: ghcr.io/utrechtuniversity/yoda-provider:dev-1.9
45 changes: 45 additions & 0 deletions .github/workflows/build-push-image-public.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: "Build public web server image and push it to registry"

on:
push:
branches:
- 'development'
- 'ci-test'
paths:
- 'docker/images/yoda_public/**'
- 'roles/yoda_landingpages/files/**'

jobs:
push-image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Check out Yoda repository
uses: actions/checkout@v3
with:
path: yoda
repository: UtrechtUniversity/yoda
ref: development

- name: Authenticate to the container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Stage landing page files for Docker image
run: |
cd yoda/docker/images/yoda_public
./stage-uploads.sh
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: yoda/docker/images/yoda_public
file: yoda/docker/images/yoda_public/Dockerfile
push: true
tags: ghcr.io/utrechtuniversity/yoda-public:dev-1.9
39 changes: 39 additions & 0 deletions .github/workflows/build-push-image-web-mock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: "Build web mock service image and push it to registry"

on:
push:
branches:
- 'development'
- 'ci-test'
paths:
- 'docker/images/yoda_web_mock/**'

jobs:
push-image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Check out Yoda repository
uses: actions/checkout@v3
with:
path: yoda
repository: UtrechtUniversity/yoda
ref: development

- name: Authenticate to the container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: yoda/docker/images/yoda_web_mock
file: yoda/docker/images/yoda_web_mock/Dockerfile
push: true
tags: ghcr.io/utrechtuniversity/yoda-web-mock:dev-1.9

0 comments on commit a0f8066

Please sign in to comment.