mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
6ccc92e47e
Co-authored-by: Victor Büttner <victor@0x23.dk> Co-authored-by: Clément Michaud <clement.michaud34@gmail.com>
24 lines
1001 B
Bash
Executable File
24 lines
1001 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set +u
|
|
|
|
DOCKER_IMAGE=authelia/authelia
|
|
|
|
if [[ $BUILDKITE_LABEL == ":hammer_and_wrench: Unit Test" ]]; then
|
|
tar -czf authelia-public_html.tar.gz -C dist public_html
|
|
sha256sum authelia-public_html.tar.gz > authelia-public_html.tar.gz.sha256
|
|
fi
|
|
|
|
if [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]]; then
|
|
echo "--- :docker: Saving artifacts for :buildkite: :docker: :github: releases"
|
|
# Save binary for buildkite and github artifacts
|
|
if [[ "${ARCH}" != "coverage" ]]; then
|
|
docker create --name authelia-binary ${DOCKER_IMAGE}:latest
|
|
docker cp authelia-binary:/app/authelia ./authelia-"${OS}"-"${ARCH}"
|
|
docker rm -f authelia-binary
|
|
tar -czf authelia-"${OS}"-"${ARCH}".tar.gz authelia-"${OS}"-"${ARCH}" authelia.service config.template.yml
|
|
sha256sum authelia-"${OS}"-"${ARCH}".tar.gz > authelia-"${OS}"-"${ARCH}".tar.gz.sha256
|
|
fi
|
|
# Saving image for push to docker hub
|
|
docker save ${DOCKER_IMAGE} | zstdmt -T0 -12 > authelia-image-"${ARCH}".tar.zst
|
|
fi |