Merge pull request #77 from lpalashevski/fix-view-server-config #42
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
# SPDX-License-Identifier: Apache-2.0 | |
# Copyright Contributors to the ODPi Egeria project. | |
name: "Container build" | |
# Trigger after code is merged. only on main repo | |
# - does not run on modification (may be just text) | |
on: | |
push: | |
branches: [main] | |
# Also manual if needed - in case of a failed publish | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: "Container build" | |
if: startsWith(github.repository,'odpi/') | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout source | |
# Only for a merge | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to container registry (Quay.io) | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_IO_USERNAME }} | |
password: ${{ secrets.QUAY_IO_ACCESS_TOKEN }} | |
- name: Login to container registry (Docker Hub) | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
# QEMU is needed for ARM64 build for egeria-configure | |
# egeria-configure needs to install utilities | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# This action will also use the file .tag-append which might contain an | |
# additional value like '-0' to represent an extension to the version,ie | |
# for rebuilds. This should be reset for each revision | |
- name: Set Release version env variable - base it on the last part of what we have in the dockerfile FROM line | |
run: | | |
echo "VERSION=$(cat Dockerfile | grep FROM | awk -F':' '{print $2}')$(cat .tag-append|grep -v '#')" >> $GITHUB_ENV | |
- name: Build and push(jupyter) to quay.io and docker.io | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: odpi/jupyter:${{ env.VERSION }}, odpi/jupyter:latest, quay.io/odpi/jupyter:${{ env.VERSION }}, quay.io/odpi/jupyter:latest | |
platforms: linux/amd64,linux/arm64 |