Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
Comment thread
KSXGitHub marked this conversation as resolved.
end_of_line = lf
charset = utf-8
insert_final_newline = true
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint

on:
push:
branches: [master]
pull_request:

permissions:
contents: read

jobs:
shfmt:
name: shell formatting (shfmt)
runs-on: ubuntu-latest
env:
SHFMT_VERSION: v3.10.0
steps:
- uses: actions/checkout@v4

- name: Install shfmt
run: |
curl -fsSL \
"https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64" \
-o /usr/local/bin/shfmt
chmod +x /usr/local/bin/shfmt
shfmt --version

- name: Check formatting
run: shfmt -d .
24 changes: 12 additions & 12 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assets=$INPUT_ASSETS
asset_dir=$INPUT_ASSET_DIR
updpkgsums=$INPUT_UPDPKGSUMS
test=$INPUT_TEST
read -r -a test_flags <<< "$INPUT_TEST_FLAGS"
read -r -a test_flags <<<"$INPUT_TEST_FLAGS"
post_process=$INPUT_POST_PROCESS
commit_username=$INPUT_COMMIT_USERNAME
commit_email=$INPUT_COMMIT_EMAIL
Expand Down Expand Up @@ -114,17 +114,17 @@ fi
echo '::endgroup::'

if [ "$updpkgsums" == "true" ]; then
echo '::group::Updating checksums'
cd /tmp/local-repo/
updpkgsums
echo '::endgroup::'
echo '::group::Updating checksums'
cd /tmp/local-repo/
updpkgsums
echo '::endgroup::'
fi

if [ "$test" == "true" ]; then
echo '::group::Building package with makepkg'
cd /tmp/local-repo/
makepkg "${test_flags[@]}"
echo '::endgroup::'
echo '::group::Building package with makepkg'
cd /tmp/local-repo/
makepkg "${test_flags[@]}"
echo '::endgroup::'
fi

echo '::group::Generating .SRCINFO'
Expand All @@ -133,10 +133,10 @@ makepkg --printsrcinfo >.SRCINFO
echo '::endgroup::'

if [ -n "$post_process" ]; then
echo '::group::Executing post process commands'
cd /tmp/local-repo/
echo '::group::Executing post process commands'
cd /tmp/local-repo/
eval "$post_process"
echo '::endgroup::'
echo '::endgroup::'
fi

echo '::group::Committing files to the repository'
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo '::group::Creating builder user'
useradd --create-home --shell /bin/bash builder
passwd --delete builder
mkdir -p /etc/sudoers.d/
echo "builder ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/builder
echo "builder ALL=(root) NOPASSWD:ALL" >/etc/sudoers.d/builder
echo '::endgroup::'

echo '::group::Initializing SSH directory'
Expand Down
Loading