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: on:
# Trigger the workflow on push or pull request, # Trigger the workflow on push or pull request,
@ -45,12 +45,3 @@ jobs:
file: ./solr/Dockerfile file: ./solr/Dockerfile
push: false push: false
tags: kowhai/ckan-docker-solr:test-build-only 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: on:
push: # Trigger the workflow after build.yml,
branches: [ 'main' ] # but only for the master branch
tags: [ 'ckan-*.*.*' ] workflow_run:
pull_request: workflows: ["Build CKAN Docker auxiliary images"]
branches: [ 'main' ] branches: [master]
types:
- completed
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: mjanez/ckan-spatial
jobs: jobs:
docker: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up QEMU - uses: actions/checkout@v2
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v1
- name: Checkout - name: Set up QEMU
uses: actions/checkout@v1 uses: docker/setup-qemu-action@v1
- name: Login to registry - name: Login to registry
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'

View File

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