Skip to content

Commit dbcb5b4

Browse files
authored
Merge pull request #2 from jsturtevant/fix-ci
rename the cache image
2 parents 90ea693 + 67cf2b2 commit dbcb5b4

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

.github/workflows/cleanup.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
echo "deleting images that start with 'pr-'"
2323
images=$(gh api \
2424
-H "Accept: application/vnd.github+json" \
25-
/users/jsturtevant/packages/container/debug-installer/versions \
25+
/users/jsturtevant/packages/container/debug-installer-cache/versions \
2626
--jq '.[] | select(.metadata.container.tags | any(startswith("pr-"))) | .id')
2727
2828
for image in $images; do
2929
# check if image is older than 20hrs
3030
image_age=$(gh api \
3131
-H "Accept: application/vnd.github+json" \
32-
/users/jsturtevant/packages/container/debug-installer/versions/$image \
32+
/users/jsturtevant/packages/container/debug-installer-cache/versions/$image \
3333
--jq '.updated_at')
3434
3535
if [[ $(date -d "$image_age" +%s) > $(date -d "24 hours ago" +%s) ]]; then
@@ -39,5 +39,5 @@ jobs:
3939
4040
echo "deleting image $image"
4141
# https://github.com/cli/cli/issues/3937
42-
echo -n | gh api --method DELETE -H "Accept: application/vnd.github+json" /users/jsturtevant/packages/container/debug-installer/versions/$image --input -
42+
echo -n | gh api --method DELETE -H "Accept: application/vnd.github+json" /users/jsturtevant/packages/container/debug-installer-cache/versions/$image --input -
4343
done

.github/workflows/installer.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: image
33
on:
44
push:
55
tags: ["image-v*"]
6-
branches:
7-
- main
86
pull_request:
97
branches:
108
- main
@@ -39,12 +37,12 @@ jobs:
3937
- name: build image
4038
run: |
4139
echo $env:IMAGE_VERSION
42-
.\build-installer.ps1 -version $env:IMAGE_VERSION
40+
.\build-installer-cache.ps1 -version $env:IMAGE_VERSION
4341
- name: push image
4442
run: |
4543
echo $env:IMAGE_VERSION
4644
$tag=$env:IMAGE_VERSION
47-
docker image push ghcr.io/jsturtevant/debug-installer:$tag
45+
docker image push ghcr.io/jsturtevant/debug-installer-cache:$tag
4846
- name: comment on PR
4947
if: ${{ github.event_name == 'pull_request' }}
5048
env:
@@ -53,7 +51,7 @@ jobs:
5351
$comment=@"
5452
Thank you for the contribution :rocket: The debug installer cache image has been published to a temporary repository.
5553
56-
You can use it by referencing: ``ghcr.io/jsturtevant/debug-installer:$env:IMAGE_VERSION``.
54+
You can use it by referencing: ``ghcr.io/jsturtevant/debug-installer-cache:$env:IMAGE_VERSION``.
5755
5856
It will be removed in 24 hours.
5957
"@

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG INSTALLER_VERSION="${latest}"
2-
FROM ghcr.io/jsturtevant/debug-installer:${INSTALLER_VERSION} as installer
2+
FROM ghcr.io/jsturtevant/debug-installer-cache:${INSTALLER_VERSION} as installer
33

44
FROM ghcr.io/marosset/host-process-scratch-image:latest AS runtime
55
WORKDIR /apps
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
param ($version='latest', $image='ghcr.io/jsturtevant/debug-installer')
1+
param ($version='latest', $image='ghcr.io/jsturtevant/debug-installer-cache')
22

33
docker build -t "${image}:${version}" -f Dockerfile.installer .

0 commit comments

Comments
 (0)