Skip to content

Try relative imports of tahu files if global import fails #29

Try relative imports of tahu files if global import fails

Try relative imports of tahu files if global import fails #29

Workflow file for this run

name: Build Docker Image Enki
on:
push:
tags:
- 'v*'
pull_request:
branches:
- 'main'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-push-docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Get the version
id: get_version
run: |
image_name=$(echo ${GITHUB_REPOSITORY} | tr A-Z a-z)
echo "image-name=$image_name" >> "$GITHUB_OUTPUT"
echo "ghcr-tag=ghcr.io/$image_name:${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build only
if: ${{ github.event_name != 'push' }}
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
push: false
tags: ${{ steps.get_version.outputs.image-name }}:latest
- name: Build and push
if: ${{ github.event_name == 'push' }}
id: docker_build_push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.get_version.outputs.ghcr-tag }}
labels: ${{ steps.meta.outputs.labels }}