Newer
Older
# images builds all container images in the Repository
ARG CONTAINER_REGISTRY=quay.io/shivering-isles
BUILD +images-earthly --CONTAINER_REGISTRY=${CONTAINER_REGISTRY}
BUILD +images-dockerfile --CONTAINER_REGISTRY=${CONTAINER_REGISTRY}
images-src:
FROM quay.io/fedora/fedora:38
COPY images/ ./images
images-earthly:
FROM +images-src
ARG CONTAINER_REGISTRY=quay.io/shivering-isles
FOR dir IN $(find ./images -type d -execdir test -f {}/Earthfile -a \! -e {}/.skip-earthly \; -print)
BUILD "${dir}+container" --registry="$CONTAINER_REGISTRY/$(basename ${dir})"
END
images-dockerfile:
FROM +images-src
ARG CONTAINER_REGISTRY=quay.io/shivering-isles
FOR dir IN $(find ./images -type d -execdir test -f {}/Dockerfile -a \! -e {}/Earthfile -a \! -e {}/.skip-earthly \; -print)
FROM DOCKERFILE -f "${dir}/Dockerfile" "${dir}"
SAVE IMAGE "$CONTAINER_REGISTRY/$(basename ${dir})"
END
# changelog generates a local RELEASENOTES.md file using git-chglog
changelog:
FROM quay.io/git-chglog/git-chglog:0.15.4
COPY . /src
WORKDIR /src
RUN git-chglog --template .chglog/unreleased.tpl.md --next-tag "v$(date +%y.%m)" --output RELEASENOTES.md
SAVE ARTIFACT RELEASENOTES.md AS LOCAL RELEASENOTES.md
# merge allows to merge branches in the origin remote, this helps to keep everything signed
merge:
LOCALLY
ARG --required branch
RUN git fetch
RUN git merge --no-ff origin/${branch} --no-edit
RUN git push
RUN git push origin --delete ${branch}