Skip to content

Commit 90dba09

Browse files
committed
Message grouping
1 parent dd17382 commit 90dba09

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
FROM archlinux/base
22

3+
RUN echo '::group::Building docker image'
4+
5+
RUN echo '::group::Installing pacman packages'
36
RUN pacman -Sy && \
47
pacman -Sy --noconfirm --needed openssh sudo \
58
git fakeroot binutils gcc awk binutils xz \
69
libarchive bzip2 coreutils file findutils \
710
gettext grep gzip sed ncurses util-linux
11+
RUN echo '::endgroup::'
812

13+
RUN echo '::group::Copying necessary files'
914
COPY entrypoint.sh /entrypoint.sh
1015
COPY build.sh /build.sh
1116
COPY ssh_config /ssh_config
17+
RUN echo '::endgroup::'
18+
19+
RUN echo '::endgroup::'
1220

1321
ENTRYPOINT ["/entrypoint.sh"]

build.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,30 @@ ssh_keyscan_types=$INPUT_SSH_KEYSCAN_TYPES
1212

1313
export HOME=/home/builder
1414

15-
echo 'Adding aur.archlinux.org to known hosts...'
15+
echo '::group::Adding aur.archlinux.org to known hosts'
1616
ssh-keyscan -v -t "$ssh_keyscan_types" aur.archlinux.org >> ~/.ssh/known_hosts
17+
echo '::endgroup::'
1718

18-
echo 'Importing private key...'
19+
echo '::group::Importing private key'
1920
echo "$ssh_private_key" > ~/.ssh/aur
2021
chmod -vR 600 ~/.ssh/aur*
2122
ssh-keygen -vy -f ~/.ssh/aur > ~/.ssh/aur.pub
23+
echo '::endgroup::'
2224

23-
echo 'Checksums of SSH keys...'
25+
echo '::group::Checksums of SSH keys'
2426
sha512sum ~/.ssh/aur ~/.ssh/aur.pub
27+
echo '::endgroup::'
2528

26-
echo 'Configuring git...'
29+
echo '::group::Configuring git'
2730
git config --global user.name "$commit_username"
2831
git config --global user.email "$commit_email"
32+
echo '::endgroup::'
2933

30-
echo 'Cloning AUR package into /tmp/local-repo...'
34+
echo '::group::Cloning AUR package into /tmp/local-repo'
3135
git clone -v "https://aur.archlinux.org/${pkgname}.git" /tmp/local-repo
36+
echo '::endgroup::'
37+
38+
echo '::group::Generating PKGBUILD and .SRCINFO'
3239
cd /tmp/local-repo
3340

3441
echo 'Copying PKGBUILD...'
@@ -37,8 +44,11 @@ cp -v /PKGBUILD ./
3744
echo "Updating .SRCINFO"
3845
makepkg --printsrcinfo > .SRCINFO
3946

40-
echo "Publishing..."
47+
echo '::endgroup::'
48+
49+
echo '::group::Publishing'
4150
git remote add aur "ssh://[email protected]/${pkgname}.git"
4251
git add -fv PKGBUILD .SRCINFO
4352
git commit --allow-empty -m "$commit_message"
4453
git push -fv aur master
54+
echo '::endgroup::'

entrypoint.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ set -o errexit -o pipefail -o nounset
44

55
pkgbuild=$INPUT_PKGBUILD
66

7-
echo 'Creating builder user...'
7+
echo '::group::Creating builder user'
88
useradd --create-home --shell /bin/bash builder
99
passwd --delete builder
10+
echo '::endgroup::'
1011

11-
echo 'Initializing ssh directory...'
12+
echo '::group::Initializing ssh directory'
1213
mkdir -pv /home/builder/.ssh
1314
touch /home/builder/.ssh/known_hosts
1415
cp -v /ssh_config /home/builder/.ssh/config
1516
chown -vR builder:builder /home/builder
1617
chmod -vR 600 /home/builder/.ssh/*
18+
echo '::endgroup::'
1719

18-
echo 'Copying PKGBUILD...'
20+
echo '::group::Copying PKGBUILD'
1921
cp -r "$pkgbuild" /PKGBUILD
22+
echo '::endgroup::'
2023

21-
echo 'Running build.sh...'
2224
exec runuser builder --command 'bash -l -c /build.sh'

0 commit comments

Comments
 (0)