Skip to content

install libssl3

install libssl3 #51

name: Docker
on:
push:
env:
IMAGE_NAME: terminusdb/swipl
jobs:
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
- name: Log into registry
if: >
github.event_name == 'push' && (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/v')
)
run: echo '${{ secrets.DOCKER_PASS }}' | docker login -u terminusdb --password-stdin
- name: Set image name
if: >
github.event_name == 'push' && (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/v')
)
run: |
IMAGE_ID=$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo '${{ github.ref }}' | sed -e 's,.*/\(.*\),\1,')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo "image_tag=${IMAGE_ID}:${VERSION}" >> $GITHUB_ENV
- name: Build and push image image
run: |
if [ -z "${{ env.image_tag }}" ]; then
docker buildx build . --file Dockerfile --tag $IMAGE_NAME --platform linux/amd64,linux/arm64
else
docker buildx build . --file Dockerfile --tag ${{ env.image_tag }} --platform linux/amd64,linux/arm64 --push
fi