name: build healthchecks on: - push jobs: build: runs-on: nixos-nix-latest # env: # REGISTRY: ${{ secrets.DOCKER_REGISTRY }} # REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }} # USERNAME: ${{ secrets.DOCKER_USERNAME }} # PASSWORD: ${{ secrets.DOCKER_PASSWORD }} steps: - run: set - uses: actions/checkout@v3 - run: nix build -L .#webserver - run: push-container result --repository healthchecks/webserver - run: nix build -L .#smtpd - run: push-container result --repository healthchecks/smtpd - run: nix build -L .#sendalerts - run: push-container result --repository healthchecks/sendalerts - run: nix build -L .#sendreports - run: push-container result --repository healthchecks/sendreports - run: nix build -L .#maintenance - run: push-container result --repository healthchecks/maintenance - run: nix build -L .#migrate - run: push-container result --repository healthchecks/migrate - run: nix build -L .#static - run: push-container result --repository healthchecks/static # - run: nix build -L .#default # - run: echo -n "${PASSWORD}" | podman login --username "${USERNAME}" --password-stdin "${REGISTRY}" # - run: podman load --input result | sed -n -e "s/Loaded image:.\\(.*\\)/loaded-image=\\1/p" >> $GITHUB_OUTPUT # id: podman-load-image # - run: podman images # - run: podman tag "${IMAGE}" "${REGISTRY}/${REPOSITORY}:${GITHUB_RUN_NUMBER}-${GITHUB_SHA:0:8}" # env: # IMAGE: ${{ steps.podman-load-image.outputs.loaded-image }} # - run: podman tag "${IMAGE}" "${REGISTRY}/${REPOSITORY}:latest" # env: # IMAGE: ${{ steps.podman-load-image.outputs.loaded-image }} # - run: podman images # - run: podman push "${REGISTRY}/${REPOSITORY}:${GITHUB_RUN_NUMBER}-${GITHUB_SHA:0:8}" # - run: podman push "${REGISTRY}/${REPOSITORY}:latest" # - run: podman logout "${REGISTRY}"