docker-healthchecks/.forgejo/workflows/build.yaml

45 lines
2 KiB
YAML
Raw Normal View History

2023-08-27 11:26:08 -05:00
name: build healthchecks
on:
- push
jobs:
build:
2023-08-27 12:44:41 -05:00
runs-on: nixos-nix-latest
2023-08-27 14:10:30 -05:00
env:
REGISTRY: https://git.ocjtech.us/jeff
2023-08-27 15:02:18 -05:00
# USERNAME: ${{ env.GITHUB_ACTOR }}
# PASSWORD: ${{ env.GITHUB_TOKEN }}
2023-08-27 11:26:08 -05:00
steps:
2023-08-27 11:29:35 -05:00
- run: set
2023-08-27 11:26:08 -05:00
- uses: actions/checkout@v3
2023-08-27 15:02:18 -05:00
- run: echo -n "${GITHUB_TOKEN}" | docker login --username "${GITHUB_ACTOR}" --password-stdin "${REGISTRY}"
2023-08-27 11:27:38 -05:00
- run: nix build -L .#webserver
2023-08-27 14:59:41 -05:00
# - run: push-container result --repository healthchecks/webserver
2023-08-27 11:27:38 -05:00
- run: nix build -L .#smtpd
2023-08-27 14:59:41 -05:00
# - run: push-container result --repository healthchecks/smtpd
2023-08-27 11:27:38 -05:00
- run: nix build -L .#sendalerts
2023-08-27 14:59:41 -05:00
# - run: push-container result --repository healthchecks/sendalerts
2023-08-27 11:27:38 -05:00
- run: nix build -L .#sendreports
2023-08-27 14:59:41 -05:00
# - run: push-container result --repository healthchecks/sendreports
2023-08-27 11:27:38 -05:00
- run: nix build -L .#maintenance
2023-08-27 14:59:41 -05:00
# - run: push-container result --repository healthchecks/maintenance
2023-08-27 11:27:38 -05:00
- run: nix build -L .#migrate
2023-08-27 14:59:41 -05:00
# - run: push-container result --repository healthchecks/migrate
2023-08-27 11:27:38 -05:00
- run: nix build -L .#static
2023-08-27 14:59:41 -05:00
# - run: push-container result --repository healthchecks/static
2023-08-27 11:26:08 -05:00
# - 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}"