Merge former commits from upstream #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build/push dev Docker images | |
on: | |
pull_request: | |
paths: | |
- sddi-base/** | |
- sddi/** | |
- sddi-social/** | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-push-images: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- | |
name: Parse short sha | |
uses: benjlevesque/[email protected] | |
id: short-sha | |
- | |
name: Checkout repository | |
uses: actions/checkout@v3 | |
- | |
name: Log in to the Github Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# SDDI-BASE | |
- | |
name: Extract metadata (tags, labels) for docker image | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
tags: | | |
# Latest tag for PR, PR number only | |
type=ref,event=pr,prefix=sddi-base-pr- | |
# Tag for with commit sha appended | |
type=ref,event=pr,prefix=sddi-base-pr-,suffix=-{{sha}} | |
labels: | | |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.title=ckan-sddi-base-docker-dev | |
- | |
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}} | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: sddi-base | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- | |
name: Print image names | |
run: | | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}" | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}" | |
- | |
name: Extract metadata (tags, labels) for docker image | |
id: meta-debug | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
tags: | | |
# Latest tag for PR, PR number only | |
type=ref,event=pr,prefix=sddi-base-pr-,suffix=-debug | |
# Tag for with commit sha appended | |
type=ref,event=pr,prefix=sddi-base-pr-,suffix=-{{sha}}-debug | |
labels: | | |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.title=ckan-sddi-base-docker-dev-debug | |
- | |
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-debug | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: sddi-base | |
file: sddi-base/Dockerfile.debug | |
tags: ${{ steps.meta-debug.outputs.tags }} | |
labels: ${{ steps.meta-debug.outputs.labels }} | |
build-args: | | |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
BASEIMAGE_VERSION=sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }} | |
- | |
name: Print image names | |
run: | | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-debug" | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug" | |
# SDDI | |
- | |
name: Extract metadata (tags, labels) for docker image | |
id: meta-sddi | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
tags: | | |
type=ref,event=pr,prefix=sddi-pr- | |
type=ref,event=pr,prefix=sddi-pr-,suffix=-{{sha}} | |
labels: | | |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.title=ckan-sddi-docker-dev | |
- | |
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}} | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: sddi | |
tags: ${{ steps.meta-sddi.outputs.tags }} | |
labels: ${{ steps.meta-sddi.outputs.labels }} | |
build-args: | | |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
BASEIMAGE_VERSION=sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }} | |
- | |
name: Print image names | |
run: | | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}" | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}" | |
- | |
name: Extract metadata (tags, labels) for docker image | |
id: meta-sddi-debug | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
tags: | | |
type=ref,event=pr,prefix=sddi-pr-,suffix=-debug | |
type=ref,event=pr,prefix=sddi-pr-,suffix=-{{sha}}-debug | |
labels: | | |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.title=ckan-sddi-docker-dev-debug | |
- | |
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-debug | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: sddi | |
file: sddi/Dockerfile.debug | |
tags: ${{ steps.meta-sddi-debug.outputs.tags }} | |
labels: ${{ steps.meta-sddi-debug.outputs.labels }} | |
build-args: | | |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
BASEIMAGE_VERSION=sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }} | |
- | |
name: Print image names | |
run: | | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-debug" | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug" | |
# SDDI-SOCIAL | |
- | |
name: Extract metadata (tags, labels) for docker image | |
id: meta-sddi-social | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
tags: | | |
type=ref,event=pr,prefix=sddi-social-pr- | |
type=ref,event=pr,prefix=sddi-social-pr-,suffix=-{{sha}} | |
labels: | | |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.title=ckan-sddi-social-docker-dev | |
- | |
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}} | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: sddi-social | |
tags: ${{ steps.meta-sddi-social.outputs.tags }} | |
labels: ${{ steps.meta-sddi-social.outputs.labels }} | |
build-args: | | |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
BASEIMAGE_VERSION=sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }} | |
- | |
name: Print image names | |
run: | | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}" | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}" | |
- | |
name: Extract metadata (tags, labels) for docker image | |
id: meta-sddi-social-debug | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
tags: | | |
type=ref,event=pr,prefix=sddi-social-pr-,suffix=-debug | |
type=ref,event=pr,prefix=sddi-social-pr-,suffix=-{{sha}}-debug | |
labels: | | |
maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) | |
org.opencontainers.image.title=ckan-sddi-social-docker-dev-debug | |
- | |
name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-debug | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: sddi-social | |
file: sddi-social/Dockerfile.debug | |
tags: ${{ steps.meta-sddi-social-debug.outputs.tags }} | |
labels: ${{ steps.meta-sddi-social-debug.outputs.labels }} | |
build-args: | | |
BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev | |
BASEIMAGE_VERSION=sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }} | |
- | |
name: Print image names | |
run: | | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-debug" | |
echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug" |