Skip to content

Commit 1b8d86c

Browse files
author
Simen Andrè Vikestrand Skogum
committed
feat: streamline jq installation and improve error handling in release plan workflow
1 parent 8c0fdc2 commit 1b8d86c

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

.github/workflows/create-release-pr.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,19 @@ jobs:
2121
ref: dev
2222
fetch-depth: 0
2323

24-
- name: Ensure jq
25-
run: sudo apt-get update && sudo apt-get install -y jq
26-
2724
- name: Build release plan
2825
id: plan
2926
shell: bash
3027
run: |
3128
set -euo pipefail
29+
sudo apt-get update >/dev/null && sudo apt-get install -y jq >/dev/null
3230
IFS=, read -r -a ARR <<<"${{ github.event.inputs.dirs }}"
3331
includes="[]"
3432
for d in "${ARR[@]}"; do
3533
d="${d//[$'\n\r\t ']/}"
3634
[ -n "$d" ] || continue
37-
if [ ! -f "$d/Dockerfile" ]; then
38-
echo "Skip: $d (no Dockerfile)" >&2
39-
continue
40-
fi
41-
if [ ! -f "$d/VERSION" ]; then
42-
echo "Skip: $d (no VERSION)" >&2
43-
continue
44-
fi
35+
[ -f "$d/Dockerfile" ] || { echo "Skip: $d (no Dockerfile)"; continue; }
36+
[ -f "$d/VERSION" ] || { echo "Skip: $d (no VERSION)"; continue; }
4537
ver="$(tr -d '\n\r\t ' < "$d/VERSION")"
4638
major="$(basename "$d")"
4739
app="$(basename "$(dirname "$d")")"

0 commit comments

Comments
 (0)