diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index e4d7d74..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "monthly" - - - package-ecosystem: "bun" - directory: "/web" - schedule: - interval: "monthly" - - - package-ecosystem: "uv" - directory: "/" - schedule: - interval: "monthly" diff --git a/.github/workflows/docker-clean.yml b/.github/workflows/docker-clean.yml deleted file mode 100644 index f381d72..0000000 --- a/.github/workflows/docker-clean.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Clean dangling Docker images - -on: - workflow_dispatch: - -jobs: - docker-clean: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Delete untagged GHCR versions - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - set -euo pipefail - OWNER="${GITHUB_REPOSITORY_OWNER}" - PACKAGE="$(echo "${GITHUB_REPOSITORY##*/}" | tr '[:upper:]' '[:lower:]')" - - OWNER_TYPE="$(gh api "/users/${OWNER}" -q '.type')" - if [[ "${OWNER_TYPE}" == "Organization" ]]; then - SCOPE="orgs/${OWNER}" - else - SCOPE="users/${OWNER}" - fi - - BASE_PATH="/${SCOPE}/packages/container/${PACKAGE}" - - if ! gh api "${BASE_PATH}" >/dev/null 2>&1; then - echo "Package ghcr.io/${OWNER}/${PACKAGE} not found or accessible. Nothing to clean." - exit 0 - fi - - mapfile -t VERSION_IDS < <(gh api --paginate "${BASE_PATH}/versions?per_page=100" \ - -q '.[] | select(.metadata.container.tags | length == 0) | .id') - - if [[ ${#VERSION_IDS[@]} -eq 0 ]]; then - echo "No untagged versions to delete." - exit 0 - fi - - echo "Deleting ${#VERSION_IDS[@]} untagged versions from ghcr.io/${OWNER}/${PACKAGE}..." - for id in "${VERSION_IDS[@]}"; do - gh api -X DELETE "${BASE_PATH}/versions/${id}" >/dev/null - echo "Deleted version ${id}" - done - - echo "Cleanup complete."