mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-12 15:53:46 -04:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -16,23 +16,23 @@ workflows:
|
||||
'.github/workflows/main.yaml':
|
||||
- 'actions/checkout@v7.0.1'
|
||||
- 'actions/download-artifact@v8.0.2'
|
||||
- 'docker/login-action@v4.7.0'
|
||||
- 'docker/login-action@v4.8.0'
|
||||
'.github/workflows/merge-forward.yaml':
|
||||
- 'actions/checkout@v7.0.1'
|
||||
'.github/workflows/nightly.yaml':
|
||||
- 'actions/checkout@v7.0.1'
|
||||
- 'actions/download-artifact@v8.0.2'
|
||||
- 'docker/login-action@v4.7.0'
|
||||
- 'docker/login-action@v4.8.0'
|
||||
'.github/workflows/pr-quality.yaml':
|
||||
- 'peakoss/anti-slop@v0.3.0'
|
||||
'.github/workflows/pull-request.yaml':
|
||||
- 'actions/checkout@v7.0.1'
|
||||
- 'actions/download-artifact@v8.0.2'
|
||||
- 'docker/login-action@v4.7.0'
|
||||
- 'docker/login-action@v4.8.0'
|
||||
'.github/workflows/release.yaml':
|
||||
- 'actions/checkout@v7.0.1'
|
||||
- 'actions/download-artifact@v8.0.2'
|
||||
- 'docker/login-action@v4.7.0'
|
||||
- 'docker/login-action@v4.8.0'
|
||||
'.github/workflows/request-docs-update.yaml': []
|
||||
'.github/workflows/stale.yaml':
|
||||
- 'actions/stale@v11.0.0'
|
||||
@@ -70,9 +70,9 @@ dependencies:
|
||||
commit: 'sha1-c3c9e263c25d99ce0380d002d59b67737d91b0dc'
|
||||
owner_id: 5429470
|
||||
repo_id: 241092383
|
||||
'docker/login-action@v4.7.0':
|
||||
ref: 'v4.7.0'
|
||||
commit: 'sha1-81c6f93d4bc991e510b342a00b419b3bb4efc5c6'
|
||||
'docker/login-action@v4.8.0':
|
||||
ref: 'v4.8.0'
|
||||
commit: 'sha1-8aa5831fb8d48d8f76594c7ddde61ae58019f550'
|
||||
owner_id: 5429470
|
||||
repo_id: 287743349
|
||||
'docker/setup-buildx-action@v4.4.1':
|
||||
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
path: ${{ runner.temp }}/images
|
||||
|
||||
- name: Log in to ghcr.io
|
||||
uses: docker/login-action@v4.7.0
|
||||
uses: docker/login-action@v4.8.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
|
||||
@@ -79,14 +79,14 @@ jobs:
|
||||
path: ${{ runner.temp }}/images
|
||||
|
||||
- name: Log in to ghcr.io
|
||||
uses: docker/login-action@v4.7.0
|
||||
uses: docker/login-action@v4.8.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to docker.io
|
||||
uses: docker/login-action@v4.7.0
|
||||
uses: docker/login-action@v4.8.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
path: ${{ runner.temp }}/images
|
||||
|
||||
- name: Log in to ghcr.io
|
||||
uses: docker/login-action@v4.7.0
|
||||
uses: docker/login-action@v4.8.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
|
||||
@@ -85,14 +85,14 @@ jobs:
|
||||
path: ${{ runner.temp }}/images
|
||||
|
||||
- name: Log in to ghcr.io
|
||||
uses: docker/login-action@v4.7.0
|
||||
uses: docker/login-action@v4.8.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to docker.io
|
||||
uses: docker/login-action@v4.7.0
|
||||
uses: docker/login-action@v4.8.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
@@ -151,14 +151,14 @@ jobs:
|
||||
echo "tags=$tags" | tee -a "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Log in to ghcr.io
|
||||
uses: docker/login-action@v4.7.0
|
||||
uses: docker/login-action@v4.8.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to docker.io
|
||||
uses: docker/login-action@v4.7.0
|
||||
uses: docker/login-action@v4.8.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
@@ -4,6 +4,7 @@ set -euo pipefail
|
||||
OPTION="$*"
|
||||
LIMIT="${2:-}"
|
||||
IMAGE=coollabsio/coolify
|
||||
VARIANTS=""
|
||||
KEEP_TAG_PATTERN='^(latest|preview|main|nightly|v?[0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta|rc)\.[0-9]+)?)$'
|
||||
KEEP_TAG_EXCEPTIONS=v3,4.0.0-beta.420.1,4.0.0-beta.420.2,4.0.0-beta.420.3,4.0.0-beta.420.4,4.0.0-beta.420.5,4.0.0-beta.420.6,4.0.0-beta.420.7,4.0.0-beta.420.8,4.0.0-beta.420.9,4.0.0-beta.420.10
|
||||
KEEP_NIGHTLY_DAYS=14
|
||||
@@ -105,9 +106,11 @@ read_dockerhub_untagged_manifests() {
|
||||
url="$base"
|
||||
: > "$WORK_DIR/listing.tsv"
|
||||
while [ -n "$url" ]; do
|
||||
page="$(curl -sSf --retry 3 -H "Authorization: Bearer $hub" "$url")" \
|
||||
&& jq -r '.manifests[] | [.manifest_digest, .media_type, (.tags // [] | join(",")), .last_pushed, (if (.media_type // "" | test("index|list")) then .size else .total_size end), ([.os, .arch] | map(select(. != null and . != "")) | join("/"))] | @tsv' <<< "$page" >> "$WORK_DIR/listing.tsv" \
|
||||
|| { warn "the undocumented manifests listing of the Docker Hub API failed, the untagged manifests that no tag references wait for a later run"; return; }
|
||||
if ! page="$(curl -sSf --retry 3 -H "Authorization: Bearer $hub" "$url")" \
|
||||
|| ! jq -r '.manifests[] | [.manifest_digest, .media_type, (.tags // [] | join(",")), .last_pushed, (if (.media_type // "" | test("index|list")) then .size else .total_size end), ([.os, .arch] | map(select(. != null and . != "")) | join("/"))] | @tsv' <<< "$page" >> "$WORK_DIR/listing.tsv"; then
|
||||
warn "the undocumented manifests listing of the Docker Hub API failed, the untagged manifests that no tag references wait for a later run"
|
||||
return
|
||||
fi
|
||||
key="$(jq -r 'select(.manifests | length > 0) | .last_evaluated_key // empty' <<< "$page")"
|
||||
url="${key:+$base&last_evaluated_key=$(jq -rn --arg key "$key" '$key | @uri')}"
|
||||
done
|
||||
@@ -121,8 +124,9 @@ select_kept_tags() {
|
||||
{ cut -f 3 "$WORK_DIR/ghcr-active.tsv" | tr ',' '\n' && cut -f 3 "$WORK_DIR/dockerhub.tsv"; } | sed '/^$/d' | sort -u > "$WORK_DIR/tags.txt"
|
||||
git ls-remote --tags "https://github.com/$IMAGE.git" | sed -n 's|.*refs/tags/||p' | sed 's/\^{}$//; p; s/^v//' > "$WORK_DIR/keep.txt" \
|
||||
|| die "could not list the git tags of github.com/$IMAGE"
|
||||
gh pr list --repo "$IMAGE" --state open --limit 1000 --json number --jq '.[] | "pr-\(.number)"' >> "$WORK_DIR/keep.txt" \
|
||||
gh pr list --repo "$IMAGE" --state open --limit 1000 --json number --jq '.[] | "pr-\(.number)"' > "$WORK_DIR/pull-requests.txt" \
|
||||
|| die "gh could not list the open pull requests of $IMAGE"
|
||||
awk -v variants="$VARIANTS" '{ print; n = split(variants, variant, ","); for (i = 1; i <= n; i++) print $0 "-" variant[i] }' "$WORK_DIR/pull-requests.txt" >> "$WORK_DIR/keep.txt"
|
||||
tr ',' '\n' <<< "$KEEP_TAG_EXCEPTIONS" >> "$WORK_DIR/keep.txt"
|
||||
cutoff="$(jq -nr --argjson days "$KEEP_NIGHTLY_DAYS" 'now - $days * 86400 | strftime("%Y%m%d")')"
|
||||
{
|
||||
@@ -317,7 +321,10 @@ delete_dockerhub_manifest() {
|
||||
local token status
|
||||
token="$(registry_token docker.io pull,push,delete)"
|
||||
status="$(curl -sS --retry 3 -o /dev/null -w '%{http_code}' --head -H "Authorization: Bearer $token" -H "Accept: $MANIFEST_TYPES" "https://registry-1.docker.io/v2/$IMAGE/manifests/$1")"
|
||||
[ "$status" = 200 ] || { echo "$status"; return; }
|
||||
[ "$status" = 200 ] || {
|
||||
echo "$status"
|
||||
return
|
||||
}
|
||||
while status="$(curl -sS --retry 3 -o /dev/null -w '%{http_code}' -X DELETE -H "Authorization: Bearer $token" "https://registry-1.docker.io/v2/$IMAGE/manifests/$1")" && [ "$status" = 429 ]; do
|
||||
sleep 60
|
||||
token="$(registry_token docker.io pull,push,delete)"
|
||||
|
||||
Reference in New Issue
Block a user