Fix workflows & docker compose files

This commit is contained in:
mnjnz 2023-04-14 11:47:24 +02:00
parent 9053becc76
commit 86b6486b79
No known key found for this signature in database
GPG Key ID: 2654E8DA034EB7B5
7 changed files with 168 additions and 56 deletions

View File

@ -1,11 +1,9 @@
name: Build CKAN Docker auxiliary images
name: Build CKAN Docker auxiliary images - master
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# Trigger the workflow on push or pull request
push:
branches:
- master
branches: ['master']
pull_request:
branches:
- master

62
.github/workflows/build-tags.yml vendored Normal file
View File

@ -0,0 +1,62 @@
name: Build CKAN Docker auxiliary images - ckan-*.*.*
on:
# Trigger the workflow on push or pull request
push:
branches:
- 'ckan-*.*.*'
pull_request:
branches:
- ckan-*.*.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: NGINX build
uses: docker/build-push-action@v4
with:
context: ./nginx
file: ./nginx/Dockerfile
push: false
tags: mjanez/ckan-docker-nginx:test-build-only
- name: Apache HTTP Server build
uses: docker/build-push-action@v4
with:
context: ./apache
file: ./apache/Dockerfile
push: false
tags: mjanez/ckan-docker-apache:test-build-only
- name: PostgreSQL build
uses: docker/build-push-action@v4
with:
context: ./postgresql
file: ./postgresql/Dockerfile
push: false
tags: mjanez/ckan-docker-postgresql:test-build-only
- name: Solr build
uses: docker/build-push-action@v4
with:
context: ./solr
file: ./solr/Dockerfile
push: false
tags: mjanez/ckan-docker-solr:test-build-only
- name: ckan-pycsw build
uses: docker/build-push-action@v4
with:
context: ./ckan-pycsw
file: ./ckan-pycsw/Dockerfile
push: false
tags: mjanez/ckan-docker-pycsw:test-build-only

52
.github/workflows/docker-master.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: Build & Push CKAN-Spatial Docker master image
on:
# Trigger the workflow after build.yml
workflow_run:
workflows: ["Build CKAN Docker auxiliary images - master"]
branches: ['master']
pull_request:
branches: ['master']
types:
- completed
env:
REGISTRY: ghcr.io
IMAGE_NAME: mjanez/ckan-spatial
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Checkout
uses: actions/checkout@v2
-
name: Login to registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: ./ckan
file: ./ckan/Dockerfile

49
.github/workflows/docker-tags.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: Build & Push ckan-spatial Tag image
on:
push:
branches:
- 'ckan-*.*.*'
- '!dev/ckan-*.*.*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: mjanez/ckan-spatial
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Checkout
uses: actions/checkout@v2
-
name: Login to registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: ./ckan
file: ./ckan/Dockerfile

View File

@ -1,49 +0,0 @@
name: Build & Push CKAN-Spatial Docker image
on:
# Trigger the workflow after build.yml,
# but only for the master and ckan-*.*.* branches
workflow_run:
workflows: ["Build CKAN Docker auxiliary images"]
branches: ['master', 'ckan-*.*.*']
types:
- completed
env:
REGISTRY: ghcr.io
IMAGE_NAME: mjanez/ckan-spatial
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Login to registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: CKAN Build and push
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: ./ckan
file: ./ckan/Dockerfile

View File

@ -27,7 +27,7 @@ services:
build:
context: ckan/
dockerfile: Dockerfile
image: ghcr.io/mjanez/ckan-spatial:ckan-ckan-${CKAN_VERSION}
image: ghcr.io/mjanez/ckan-spatial:ckan-master
env_file:
- .env
depends_on:

View File

@ -26,7 +26,7 @@ services:
build:
context: ckan/
dockerfile: Dockerfile
image: ghcr.io/mjanez/ckan-spatial:ckan-ckan-${CKAN_VERSION}
image: ghcr.io/mjanez/ckan-spatial:ckan-master
env_file:
- .env
depends_on: