Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine/git:latest

RUN apk add --no-cache bash findutils
RUN apk add --no-cache bash rsync git
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

Expand Down
7 changes: 2 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
git pull "$GIT_REPOSITORY_URL"
)

debug "Enumerating contents of $1"
for file in $(find $1 -maxdepth 1 -type f -name '*.md' -execdir basename '{}' ';'); do
debug "Copying $file"
cp "$1/$file" "$tmp_dir"
done
debug "Syncing contents of $1 to repository"
rsync -avzr --delete --exclude='.git/' "$1" "$tmp_dir" || exit 1

debug "Committing and pushing changes"
(
Expand Down