From 09198b2653f35e143bf9f9f39ed9d372aca25e05 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Sun, 27 Aug 2023 11:26:08 -0500 Subject: [PATCH] add forgejo action --- .forgejo/workflows/build.yaml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .forgejo/workflows/build.yaml diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..d29ed23 --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,43 @@ +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: + - uses: actions/checkout@v3 + - nix build -L .#webserver + - push-container result --repository healthchecks/webserver + - nix build -L .#smtpd + - push-container result --repository healthchecks/smtpd + - nix build -L .#sendalerts + - push-container result --repository healthchecks/sendalerts + - nix build -L .#sendreports + - push-container result --repository healthchecks/sendreports + - nix build -L .#maintenance + - push-container result --repository healthchecks/maintenance + - nix build -L .#migrate + - push-container result --repository healthchecks/migrate + - nix build -L .#static + - 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}"