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:
parent
e3ab392736
commit
531edd9e0b
|
@ -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
|
|
||||||
|
|
|
@ -1,48 +1,50 @@
|
||||||
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'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
- name: CKAN Build and push
|
- name: CKAN Build and push
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
context: ./ckan
|
context: ./ckan
|
||||||
file: ./ckan/Dockerfile
|
file: ./ckan/Dockerfile
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue