docker-ckan/.github/workflows/docker.yml

51 lines
1.2 KiB
YAML
Raw Normal View History

name: Build & Push CKAN-Spatial Docker image
2023-03-22 16:36:55 +01:00
on:
# Trigger the workflow after build.yml,
# but only for the master branch
workflow_run:
workflows: ["Build CKAN Docker auxiliary images"]
branches: [master]
types:
- completed
2023-03-22 16:36:55 +01:00
env:
REGISTRY: ghcr.io
IMAGE_NAME: mjanez/ckan-spatial
2023-03-22 16:36:55 +01:00
jobs:
build:
2023-03-22 16:36:55 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
2023-03-22 16:51:07 +01:00
- 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 }}
2023-03-22 16:51:07 +01:00
- 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