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

52 lines
1.3 KiB
YAML
Raw Normal View History

2023-04-18 20:01:08 +02:00
name: Build & Push ckan-spatial - master
2023-04-14 11:47:24 +02:00
on:
# Trigger the workflow after build.yml
workflow_run:
workflows: ["Build CKAN Docker auxiliary images - master"]
branches: ['master']
pull_request:
branches: ['master']
types:
- completed
env:
REGISTRY: ghcr.io
IMAGE_NAME: mjanez/ckan-spatial
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Checkout
uses: actions/checkout@v2
-
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: 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