Skip to content

Commit d5f340d

Browse files
enh: add github action file to build and push images
1 parent 9e1fefa commit d5f340d

File tree

2 files changed

+52
-48
lines changed

2 files changed

+52
-48
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build and Push DCOR-CKAN Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '*.*.*' # This triggers the workflow on tags that follow the X.Y.Z format
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v1
20+
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v1
23+
24+
- name: Build and Push NGINX Image
25+
uses: docker/build-push-action@v2
26+
with:
27+
context: ./nginx
28+
file: ./nginx/Dockerfile
29+
push: true
30+
tags: |
31+
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-nginx:${{ github.ref_name }}
32+
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-nginx:latest
33+
34+
- name: Build and Push PostgreSQL Image
35+
uses: docker/build-push-action@v2
36+
with:
37+
context: ./postgresql
38+
file: ./postgresql/Dockerfile
39+
push: true
40+
tags: |
41+
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-postgresql:${{ github.ref_name }}
42+
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-postgresql:latest
43+
44+
- name: Build and Push CKAN Image
45+
uses: docker/build-push-action@v2
46+
with:
47+
context: ./ckan
48+
file: ./ckan/Dockerfile.dev # Build dcor image from dev
49+
push: true
50+
tags: |
51+
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-ckan:${{ github.ref_name }}
52+
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-ckan:latest

0 commit comments

Comments
 (0)