Build and push the current package #45
Workflow file for this run
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
# terraform managed | |
--- | |
name: Build and push the current package | |
on: | |
release: | |
types: [created, edited, published, released] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
# largely taken from cachix/install-nix-action | |
- name: install Nix | |
run: | | |
# Create a temporary workdir | |
workdir=$(mktemp -d) | |
# delete dir on exit | |
trap 'rm -rf "$workdir"' EXIT | |
# enable flakes | |
echo "experimental-features = nix-command flakes" >> "$workdir/nix.conf" | |
sh <(curl -L https://nixos.org/nix/install) --daemon --nix-extra-conf-file "$workdir/nix.conf" --no-channel-add --daemon-user-count "$(python3 -c 'import multiprocessing as mp; print(mp.cpu_count() * 2)')" | |
# Set required paths to find nix | |
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" | |
echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH" | |
- name: run development target | |
run: | | |
nix develop .#poetry --ignore-environment --keep PIPY_API_TOKEN | |
env: | |
PIPY_API_TOKEN: ${{ secrets.PIPY_API_TOKEN }} |