File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,18 @@ delete_pr_images() {
4444 fi
4545
4646 while IFS= read -r tag; do
47- if [[ " ${tag} " =~ ^pr-[0-9]+- ]]; then
48- local pull_request
47+ local pull_request
48+ if [[ " ${tag} " =~ ^pr-([0-9]+)- ]]; then
49+ pull_request=${BASH_REMATCH[1]}
50+ elif [[ " ${tag} " =~ ^githubactions-pr-([0-9]+)$ ]]; then
51+ pull_request=${BASH_REMATCH[1]}
52+ else
53+ continue
54+ fi
55+
4956 local pr_json
5057 local pr_state
5158
52- pull_request=${tag# pr-}
53- pull_request=${pull_request%% -* }
54-
5559 if ! pr_json=$( gh api \
5660 -H " Accept: application/vnd.github+json" \
5761 " /repos/NHSDigital/eps-devcontainers/pulls/${pull_request} " ) ; then
@@ -75,7 +79,6 @@ delete_pr_images() {
7579 " /orgs/nhsdigital/packages/container/${package_name} /versions/${version_id} "
7680 fi
7781 done
78- fi
7982 done <<< " ${tags}"
8083}
8184
You can’t perform that action at this time.
0 commit comments