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:
|
||||
# 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
|
||||
|
|
@ -1,48 +1,50 @@
|
|||
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:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- 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: Checkout
|
||||
uses: actions/checkout@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
|
||||
- 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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue