mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2026-04-28 06:03:18 +00:00
tweak more
This commit is contained in:
parent
016fa9564d
commit
e81159c6fb
2
.github/workflows/pull_request.yml
vendored
2
.github/workflows/pull_request.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
with:
|
||||
go-version-file: "go.mod"
|
||||
|
||||
- name: Build and test
|
||||
- name: Build and test go binaries
|
||||
run: | #shell
|
||||
go build -v ./...
|
||||
go test -v ./...
|
||||
|
|
|
|||
|
|
@ -104,10 +104,14 @@ runs:
|
|||
"$ADD_REPOSITORY" \
|
||||
"$PACKAGES"
|
||||
function create_list {
|
||||
local manifest_file=~/cache-apt-pkgs/manifest_${1}.log
|
||||
local manifest_file="${HOME}/cache-apt-pkgs/manifest_${1}.log"
|
||||
if [ -f "${manifest_file}" ]; then
|
||||
local list=$(cat "${manifest_file}" | tr '\n' ',')
|
||||
echo ${list:0:-1}
|
||||
if [ ${#list} -gt 0 ]; then
|
||||
echo ${list:0:-1}
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
|
|
|||
2
lib.sh
2
lib.sh
|
|
@ -224,6 +224,8 @@ function parse_aptfile {
|
|||
function write_manifest {
|
||||
if [ ${#2} -eq 0 ]; then
|
||||
log "Skipped ${1} manifest write. No packages to install."
|
||||
# Create empty file to ensure outputs are always set
|
||||
touch "${3}"
|
||||
else
|
||||
log "Writing ${1} packages manifest to ${3}..."
|
||||
# Remove trailing comma if present, delimit by newline and sort.
|
||||
|
|
|
|||
Loading…
Reference in a new issue