Skip to content

Commit f8f6f9d

Browse files
authored
Container CI bugfix and disable dry-run on image cleaner (#379)
## Summary <!-- Include a short paragraph of the changes introduced in this PR. If this PR requires additional context or rationale, explain why the changes are necessary. --> Final pieces needed for image CI work. Fully enables auto `latest`, `stable` tags and old image pruning. ## Details <!-- Provide a detailed list of all changes introduced in this pull request. --> - Add `pipefail` to list-tags command to catch failures - Add missing `ghcr.io/` to skopeo commands - Disable dry-run option for development image cleanup job ## Test Plan Ran with `workflow_dispatch` [see here](https://github.com/vllm-project/guidellm/actions/runs/18108553536) <img width="2032" height="955" alt="2025-09-29T15-45-39" src="https://github.com/user-attachments/assets/b981ab01-fe90-4e15-bf60-cb483508065e" /> <img width="1204" height="579" alt="2025-09-29T15-46-02" src="https://github.com/user-attachments/assets/68118168-2e80-4d45-92cc-47badc1caf16" /> --- - [x] "I certify that all code in this PR is my own, except as noted below." ## Use of AI - [ ] Includes AI-assisted code completion - [ ] Includes code generated by an AI application - [ ] Includes AI-generated tests (NOTE: AI written tests should have a docstring that includes `## WRITTEN BY AI ##`) --------- Signed-off-by: Samuel Monson <[email protected]>
1 parent 59c1be8 commit f8f6f9d

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/container-maintenance.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@ on:
99
concurrency:
1010
group: ${{ github.workflow }}
1111

12+
permissions:
13+
packages: write
14+
1215
jobs:
1316
cleanup-container-tags:
1417
runs-on: ubuntu-latest
1518
steps:
1619
- name: Delete PR and untagged images older than 2 weeks
1720
uses: snok/[email protected]
1821
with:
19-
account: ${{ github.actor }}
22+
account: ${{ github.repository_owner }}
2023
token: ${{ github.token }}
2124
image-names: ${{ github.event.repository.name }}
2225
image-tags: "pr-*"
2326
cut-off: 2w
24-
dry-run: true
27+
dry-run: false
2528

2629
push-container-tags:
2730
runs-on: ubuntu-latest
@@ -31,19 +34,20 @@ jobs:
3134
- name: Log into ghcr.io
3235
uses: redhat-actions/podman-login@v1
3336
with:
34-
username: ${{ github.actor }}
37+
username: ${{ github.repository_owner }}
3538
password: ${{ github.token }}
3639
registry: ghcr.io/${{ github.repository_owner }}
3740
- name: Get list of tags
3841
run: |
39-
skopeo list-tags docker://${{ github.repository }} | jq --raw-output '.Tags[]' > tags
42+
set -euo pipefail # Fail pipe if any command fails
43+
skopeo list-tags docker://ghcr.io/${{ github.repository }} | jq --raw-output '.Tags[]' > tags
4044
- name: Get latest release and rc tags
4145
run: |
4246
STABLE_TAG="$(grep -P '^v\d+\.\d+\.\d+$' tags | sort -rV | head -n1)"
43-
echo "STABLE_TAG=${STABLE_TAG:-v0.0.0}" >> $GITHUB_ENV
47+
echo "stable_tag=${STABLE_TAG:-v0.0.0}" >> $GITHUB_ENV
4448
LATEST_TAG="$(grep -P '^v\d+\.\d+\.\d+' tags | sort -rV | head -n1)"
45-
echo "LATEST_TAG=${LATEST_TAG:-v0.0.0}" >> $GITHUB_ENV
49+
echo "latest_tag=${LATEST_TAG:-v0.0.0}" >> $GITHUB_ENV
4650
- name: Update latest and stable tags
4751
run: |
48-
skopeo copy docker://${{ github.repository }}:${{ env.stable_tag }} docker://${{ github.repository }}:stable
49-
skopeo copy docker://${{ github.repository }}:${{ env.latest_tag }} docker://${{ github.repository }}:latest
52+
skopeo copy docker://ghcr.io/${{ github.repository }}:${{ env.stable_tag }} docker://ghcr.io/${{ github.repository }}:stable
53+
skopeo copy docker://ghcr.io/${{ github.repository }}:${{ env.latest_tag }} docker://ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)