Skip to content

Commit 47de607

Browse files
committed
CI: add basic image build jobs
This version only build development images. We'll add release images later.
1 parent 4dc4de8 commit 47de607

File tree

4 files changed

+156
-0
lines changed

4 files changed

+156
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: "Build CKAN image and push it to registry"
3+
4+
on:
5+
push:
6+
branches:
7+
- 'development'
8+
- 'dev-update-docker'
9+
paths:
10+
- '.github/workflows/build-push-image-ckan.yml'
11+
- 'docker/images/ckan/**'
12+
13+
jobs:
14+
push-image:
15+
if: github.repository == 'utrechtuniversity/epos-msl'
16+
runs-on: ubuntu-22.04
17+
permissions:
18+
contents: read
19+
packages: write
20+
steps:
21+
- name: Extract branch name
22+
shell: bash
23+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
24+
id: extract_branch
25+
26+
- name: Authenticate to the container registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@v6
35+
with:
36+
context: docker/images/ckan
37+
file: docker/images/ckan/Dockerfile
38+
push: true
39+
tags: latest
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: "Build MSL-API image and push it to registry"
3+
4+
on:
5+
push:
6+
branches:
7+
- 'development'
8+
- 'dev-update-docker'
9+
paths:
10+
- '.github/workflows/build-push-image-mslapi.yml'
11+
- 'docker/images/msl-api/**'
12+
13+
jobs:
14+
push-image:
15+
if: github.repository == 'utrechtuniversity/epos-msl'
16+
runs-on: ubuntu-22.04
17+
permissions:
18+
contents: read
19+
packages: write
20+
steps:
21+
- name: Extract branch name
22+
shell: bash
23+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
24+
id: extract_branch
25+
26+
- name: Authenticate to the container registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@v6
35+
with:
36+
context: docker/images/msl-api
37+
file: docker/images/msl-api/Dockerfile
38+
push: true
39+
tags: latest
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: "Build Nginx image and push it to registry"
3+
4+
on:
5+
push:
6+
branches:
7+
- 'development'
8+
- 'dev-update-docker'
9+
paths:
10+
- '.github/workflows/build-push-image-nginx.yml'
11+
- 'docker/images/nginx/**'
12+
13+
jobs:
14+
push-image:
15+
if: github.repository == 'utrechtuniversity/epos-msl'
16+
runs-on: ubuntu-22.04
17+
permissions:
18+
contents: read
19+
packages: write
20+
steps:
21+
- name: Extract branch name
22+
shell: bash
23+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
24+
id: extract_branch
25+
26+
- name: Authenticate to the container registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@v6
35+
with:
36+
context: docker/images/nginx
37+
file: docker/images/nginx/Dockerfile
38+
push: true
39+
tags: latest
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: "Build Solr image and push it to registry"
3+
4+
on:
5+
push:
6+
branches:
7+
- 'development'
8+
- 'dev-update-docker'
9+
paths:
10+
- '.github/workflows/build-push-image-solr.yml'
11+
- 'docker/images/solr/**'
12+
13+
jobs:
14+
push-image:
15+
if: github.repository == 'utrechtuniversity/epos-msl'
16+
runs-on: ubuntu-22.04
17+
permissions:
18+
contents: read
19+
packages: write
20+
steps:
21+
- name: Extract branch name
22+
shell: bash
23+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
24+
id: extract_branch
25+
26+
- name: Authenticate to the container registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@v6
35+
with:
36+
context: docker/images/solr
37+
file: docker/images/solr/Dockerfile
38+
push: true
39+
tags: latest

0 commit comments

Comments
 (0)