-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(build-docker): install curl and jq before creating image summary
- Loading branch information
Showing
4 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
# | ||
# .github/docker/include | ||
# | ||
# Usage: source from layer script and call the functions | ||
# | ||
# Notes: | ||
# - use sh/posix syntax only | ||
|
||
layer_begin() { | ||
printf "=== %s:%s start ===\n\n" "${0}" "layer_begin()" | ||
|
||
printf "%s: %s\n" "$1" "$(date +%Y%m%d-%H%M%S)" >/etc/ci-image-info | ||
cat /etc/ci-image-info | ||
printf "\n" | ||
|
||
echo apt update | ||
apt update || exit | ||
printf "\n" | ||
|
||
echo apt list --upgradable | ||
apt list --upgradable || exit | ||
printf "\n" | ||
|
||
echo apt upgrade -y | ||
apt upgrade -y || exit | ||
printf "\n" | ||
|
||
printf "=== %s:%s end ===\n\n" "${0}" "layer_begin()" | ||
} | ||
|
||
layer_end() { | ||
printf "=== %s:%s start ===\n\n" "${0}" "layer_end()" | ||
|
||
echo apt-get clean | ||
apt-get clean || exit | ||
printf "\n" | ||
|
||
echo rm -rf /var/lib/apt/lists/* | ||
rm -rf /var/lib/apt/lists/* || exit | ||
printf "\n" | ||
|
||
printf "=== %s:%s end ===\n\n" "${0}" "layer_end()" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
# this path from for the container | ||
# shellcheck disable=SC1091 | ||
. /.github/docker/include | ||
|
||
layer_begin "$@" | ||
|
||
PACKAGES="apt-utils bash coreutils curl jq moreutils sudo tmux vim-nox" | ||
|
||
echo apt install -y "${PACKAGES}" | ||
# shellcheck disable=SC2086 | ||
apt install -y ${PACKAGES} || exit | ||
printf "\n" | ||
|
||
layer_end "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
# | ||
# Dockerfile: ci-generic-debian | ||
# Dockerfile | ||
# | ||
|
||
From debian:bullseye-slim As ci-generic-base | ||
|
||
COPY .github/docker /.github/docker | ||
|
||
RUN .github/docker/layer-00.00-base-dependencies.sh ci-generic-debian | ||
|
||
# Copies your code file from your action repository to the filesystem path `/` of the container | ||
COPY .github/docker/entrypoint.sh /entrypoint.sh | ||
|
||
RUN rm -rvf /.github | ||
|
||
# app + args | ||
# Executes `entrypoint.sh` when the Docker container starts up | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
# extra args | ||
# CMD [] | ||
# Extra args | ||
CMD [] |