# https://github.com/casey/just python := "pixi run python" last_commit_sha1 := `git rev-parse --short HEAD` remote_image_name := "gitea.gdemontauzan.fr/maxenceg2m/github-release-notifier" remote_build_image := remote_image_name + ":" + last_commit_sha1 # Run the script run: init {{ python }} notifier.py # Init python env with pixi init: pixi install # Remove virtual env (pixi) hclean: rm -fr .pixi # Run docker compose then show logs dup: dbuild docker compose up -d docker compose logs # Build with docker compose dbuild: docker compose build # Down docker compose then build drebuild: ddown dbuild # Down docker compose ddown: docker compose down # Docker build without cache dforce-build: docker compose build --no-cache # Push a working images on registry, tagged with commit-sha1 dpush: dbuild docker tag github-release-notifier {{ remote_build_image }} docker push {{ remote_build_image }} echo "To push a tagged version, do 'just release '" # Use just a number! Without 'v'! Release a version - create a tagged images, push it and create git tag. release version: dbuild docker tag github-release-notifier {{ remote_image_name }}:{{ version }} docker push {{ remote_image_name }}:{{ version }} git tag -a v{{ version }} -m "" git push --tags # MAILPIT PART mailpit_version := "v1.11.0" mailpit_archi := "linux-amd64" mailpit_output := "mailpit-" + mailpit_version + "-" + mailpit_archi + ".tar.gz" # Retrive mailpit bin get-mail-wrapper: echo {{mailpit_output}} curl -L https://github.com/axllent/mailpit/releases/download/{{mailpit_version}}/mailpit-{{mailpit_archi}}.tar.gz --output {{mailpit_output}} tar xf {{mailpit_output}} mailpit