Compare commits

...

10 Commits

Author SHA1 Message Date
Katos
44bdca8c21 Update Dockerfile.rootless
Some checks are pending
Docker publish rootless / build (linux/amd64) (push) Waiting to run
Docker publish rootless / build (linux/arm/v7) (push) Waiting to run
Docker publish rootless / build (linux/arm64) (push) Waiting to run
Docker publish rootless / merge (push) Blocked by required conditions
Update Currencies / update-currencies (push) Waiting to run
Specify UID:GID of nonroot user to fix issue with rootless database
2025-01-08 18:58:40 +00:00
Matt Kilgore
25700c12da Update cutoff
Some checks failed
Docker publish rootless / build (linux/amd64) (push) Waiting to run
Docker publish rootless / build (linux/arm/v7) (push) Waiting to run
Docker publish rootless / build (linux/arm64) (push) Waiting to run
Docker publish rootless / merge (push) Blocked by required conditions
Update Currencies / update-currencies (push) Waiting to run
Docker publish / build (linux/amd64) (push) Has been cancelled
Docker publish / build (linux/arm/v7) (push) Has been cancelled
Docker publish / build (linux/arm64) (push) Has been cancelled
Docker publish / merge (push) Has been cancelled
2025-01-07 19:56:38 -05:00
Matt Kilgore
a252f63ae8 Update to 2025-01-07 19:55:05 -05:00
Matt Kilgore
3919ed2e91 Update docker-publish-rootless.yaml
Some checks failed
Docker publish rootless / build (linux/amd64) (push) Has been cancelled
Docker publish rootless / build (linux/arm/v7) (push) Has been cancelled
Docker publish rootless / build (linux/arm64) (push) Has been cancelled
Docker publish / build (linux/amd64) (push) Has been cancelled
Docker publish / build (linux/arm/v7) (push) Has been cancelled
Docker publish / build (linux/arm64) (push) Has been cancelled
Update Currencies / update-currencies (push) Has been cancelled
Docker publish rootless / merge (push) Has been cancelled
Docker publish / merge (push) Has been cancelled
2025-01-06 05:46:02 -05:00
Matt Kilgore
4847d8d72b add docker sbom, provenance and annotations 2025-01-06 05:43:09 -05:00
Matt Kilgore
08081d7abf Update clear-stale-docker-images.yml
Some checks are pending
Docker publish rootless / build (linux/amd64) (push) Waiting to run
Docker publish rootless / build (linux/arm/v7) (push) Waiting to run
Docker publish rootless / build (linux/arm64) (push) Waiting to run
Docker publish rootless / merge (push) Blocked by required conditions
Docker publish / build (linux/amd64) (push) Waiting to run
Docker publish / build (linux/arm/v7) (push) Waiting to run
Docker publish / build (linux/arm64) (push) Waiting to run
Docker publish / merge (push) Blocked by required conditions
Update Currencies / update-currencies (push) Waiting to run
2025-01-05 21:27:58 -05:00
Matt Kilgore
da9d0681b8 Update clear-stale-docker-images.yml 2025-01-05 21:26:07 -05:00
Matt Kilgore
f635bb1084 Update clear-stale-docker-images.yml 2025-01-05 21:16:44 -05:00
Matt Kilgore
ccb8961ed2 Update clear-stale-docker-images.yml 2025-01-05 21:14:18 -05:00
Matt Kilgore
de993f37a4 Update clear-stale-docker-images.yml 2025-01-05 21:12:18 -05:00
4 changed files with 47 additions and 13 deletions

View File

@@ -6,20 +6,47 @@ on:
workflow_dispatch:
jobs:
delete-untagged-images:
delete-old-images-main:
name: Delete Untagged Images
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: dataaxiom/ghcr-cleanup-action@v1
- name: Fetch multi-platform package version SHAs
id: multi-arch-digests
run: |
package1=$(docker manifest inspect ghcr.io/sysadminsmedia/homebox | jq -r '.manifests.[] | .digest' | paste -s -d ' ' -)
echo "multi-arch-digests=$package1" >> $GITHUB_OUTPUT
- uses: snok/container-retention-policy@v3.0.0
with:
dry-run: false
package: homebox
delete-ghost-images: true
delete-orphaned-images: true
delete-partial-images: true
delete-untagged: true
# Make sure to update this to include the latest major tags
exclude-tags: main,vnext,latest,0.*,1.*
older-than: 3 months
skip-shas: ${{ steps.multi-arch-digests.outputs.multi-arch-digests }}
# The type of account. Can be either 'org' or 'personal'.
account: sysadminsmedia
# Image name to delete. Supports passing several names as a comma-separated list.
image-names: homebox
# The cut-off for which to delete images older than. For example '2 days ago UTC'. Timezone is required.
cut-off: 90d
# Personal access token with read and delete scopes.
token: ${{ secrets.CLEANUP_PAT }}
# Restrict deletions to images without specific tags. Supports Unix-shell style wildcards
skip-tags: "!latest,!latest-rootless,!0.*,!0.*-rootless,!main,!main-rootless,!vnext,!vnext-rootless,!0,!0-rootless" # optional
# Do not actually delete images. Print output showing what would have been deleted.
dry-run: true # optional, default is false
delete-old-images-devcache:
name: Delete Cache Old Images
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: snok/container-retention-policy@v3.0.0
with:
# The type of account. Can be either 'org' or 'personal'.
account: sysadminsmedia
image-names: devcache
# The cut-off for which to delete images older than. For example '2 days ago UTC'. Timezone is required.
cut-off: 90d
# Personal access token with read and delete scopes.
token: ${{ secrets.CLEANUP_PAT }}
# Do not actually delete images. Print output showing what would have been deleted.
dry-run: true # optional, default is false

View File

@@ -101,7 +101,10 @@ jobs:
build-args: |
VERSION=${{ github.ref_name }}
COMMIT=${{ github.sha }}
provenance: true
sbom: true
annotations: ${{ steps.meta.outputs.annotations }}
- name: Export digest
run: |
mkdir -p /tmp/digests

View File

@@ -97,6 +97,9 @@ jobs:
build-args: |
VERSION=${{ github.ref_name }}
COMMIT=${{ github.sha }}
provenance: true
sbom: true
annotations: ${{ steps.meta.outputs.annotations }}
- name: Export digest
run: |

View File

@@ -67,7 +67,8 @@ ENV HBOX_STORAGE_SQLITE_URL=/data/homebox.db?_pragma=busy_timeout=2000&_pragma=j
# Install necessary runtime dependencies
RUN apk --no-cache add ca-certificates wget
RUN addgroup -S nonroot && adduser -S nonroot -G nonroot
# Create a nonroot user with UID/GID 65532
RUN addgroup -g 65532 nonroot && adduser -u 65532 -G nonroot -S nonroot
# Create application directory and copy over built Go binary
RUN mkdir /app