Skip to content

d - Add clouds to the art #14

d - Add clouds to the art

d - Add clouds to the art #14

Workflow file for this run

name: Build artifacts
env:
IMAGE_NAME: luminaut
on:
push:
branches: ["main"]
tags: ["v*"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
build-python-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: "3.12"
cache: 'pip'
- name: Install dependencies
run: uv sync
- name: Build packages
run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
# This name must match the value in release.yml
name: python_packages
path: dist/*
build-docker-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "gh_run_number=${GITHUB_RUN_ID}"
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# This changes all uppercase characters to lowercase.
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# This strips the git ref prefix from the version.
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# This strips the "v" prefix from the tag name.
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# This uses the Docker `latest` tag convention.
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION