Update actions

- Updated build.yml to test only auxiliary images.
- Update docker.yml to build and upload the image to the Github registry.
This commit is contained in:
mnjnz 2023-03-23 09:59:13 +01:00
parent e3ab392736
commit 531edd9e0b
No known key found for this signature in database
GPG Key ID: 2654E8DA034EB7B5
3 changed files with 43 additions and 50 deletions

View File

@ -1,4 +1,4 @@
name: Build CKAN Docker
name: Build CKAN Docker auxiliary images
on:
# Trigger the workflow on push or pull request,
@ -45,12 +45,3 @@ jobs:
file: ./solr/Dockerfile
push: false
tags: kowhai/ckan-docker-solr:test-build-only
- name: CKAN build
uses: docker/build-push-action@v2
with:
context: ./ckan
file: ./ckan/Dockerfile
push: false
tags: kowhai/ckan-docker-ckan:test-build-only

View File

@ -1,28 +1,30 @@
name: Build CKAN Docker
name: Build & Push CKAN-Spatial Docker image
on:
push:
branches: [ 'main' ]
tags: [ 'ckan-*.*.*' ]
pull_request:
branches: [ 'main' ]
# Trigger the workflow after build.yml,
# but only for the master branch
workflow_run:
workflows: ["Build CKAN Docker auxiliary images"]
branches: [master]
types:
- completed
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: mjanez/ckan-spatial
jobs:
docker:
build:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v1
- name: Checkout
uses: actions/checkout@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Login to registry
if: github.event_name != 'pull_request'

View File

@ -26,7 +26,7 @@ services:
dockerfile: Dockerfile
args:
- TZ=${TZ}
image: ghcr.io/mjanez/ckan-docker:ckan-2.9.8
image: ghcr.io/mjanez/ckan-spatial:master
env_file:
- .env
depends_on: