Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Prune GitHub tooling comments

Manav Rathi59f12a973f6b
diff --git a/.github/actions/setup-flutter/action.yml b/.github/actions/setup-flutter/action.yml
index 72b9af9698..ff19e426a1 100644
--- a/.github/actions/setup-flutter/action.yml
+++ b/.github/actions/setup-flutter/action.yml
@@ -6,12 +6,10 @@ runs:
steps:
- shell: bash
env:
- # Remember to change the archive SHAs below when changing the version.
- #
+ # Update every archive SHA below when changing this version:
# https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json
# https://storage.googleapis.com/flutter_infra_release/releases/releases_macos.json
# https://storage.googleapis.com/flutter_infra_release/releases/releases_windows.json
- #
FLUTTER_VERSION: "3.38.10"
run: |
set -euo pipefail
diff --git a/.github/scripts/sync-help-changelog.mjs b/.github/scripts/sync-help-changelog.mjs
index dcf8a56993..5b7388c04b 100644
--- a/.github/scripts/sync-help-changelog.mjs
+++ b/.github/scripts/sync-help-changelog.mjs
@@ -1,8 +1,5 @@
#!/usr/bin/env node
-// Prepend a release's notes to the help-site changelog. Run by app-release.yml's
-// promote, with the published release body in RELEASE_BODY.
-
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
diff --git a/.github/workflows/auth-build.yml b/.github/workflows/auth-build.yml
index 1cea4a9146..568a40dd98 100644
--- a/.github/workflows/auth-build.yml
+++ b/.github/workflows/auth-build.yml
@@ -8,7 +8,7 @@ on:
- "release/auth-v*"
workflow_dispatch:
schedule:
- # Run every weekday at ~3:45 AM IST
+ # Weekdays at ~3:45 AM IST
- cron: "15 22 * * 0-4"
permissions:
diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml
index 9be47825ed..b831a0c7e0 100644
--- a/.github/workflows/cli-release.yml
+++ b/.github/workflows/cli-release.yml
@@ -2,13 +2,6 @@ name: "Release (CLI)"
on:
push:
- # Run when a tag matching the pattern "cli-v*"" is pushed
- #
- # Tip: to test this workflow, push at tag with a pre-release version,
- # e.g. `cli-v1.2.3-test`, where 1.2.3 is the expected version number of
- # the next release that'll go out.
- #
- # See: [Note: Testing release workflows that are triggered by tags]
tags:
- "cli-v*"
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 288450689e..705e754d0f 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -1,17 +1,9 @@
-# The only reason we're making a custom CodeQL configuration is because the
-# default setup does not have an option to run daily / weekly instead of per
-# push, which is too slow.
-#
-# In the future, it might become faster. Then just delete this file, and revert
-# to the default configuration.
-#
-# References:
-# https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/
+# This custom workflow runs weekly because per-push CodeQL is too slow.
name: "CodeQL"
on:
- workflow_dispatch: # Allow running manually
+ workflow_dispatch:
schedule:
- cron: "22 1 * * 1"
@@ -21,9 +13,8 @@ jobs:
runs-on: 'ubuntu-latest'
permissions:
contents: read
- # Required for all workflows.
security-events: write
- # Required to fetch internal or private CodeQL packs.
+ # Fetch private CodeQL packs.
packages: read
strategy:
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
index 0d069733ca..417bc49fd0 100644
--- a/.github/workflows/dependency-review.yml
+++ b/.github/workflows/dependency-review.yml
@@ -1,7 +1,5 @@
name: "Dependency review"
-# Fail if a dependency added or updated by a PR has a known security advisory.
-
on:
pull_request:
paths:
diff --git a/.github/workflows/docs-deploy-redirect.yml b/.github/workflows/docs-deploy-redirect.yml
index 511ca6d961..d773855358 100644
--- a/.github/workflows/docs-deploy-redirect.yml
+++ b/.github/workflows/docs-deploy-redirect.yml
@@ -24,6 +24,5 @@ jobs:
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- # Deploy the redirect file to the existing ente project's help branch
- # This will replace the current help.ente.io content with just redirects
+ # This replaces help.ente.io with only the redirect files.
command: pages deploy --project-name=ente --commit-dirty=true --branch=help infra/services/help-redir
diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml
index 43957a69b1..9a161786d0 100644
--- a/.github/workflows/docs-deploy.yml
+++ b/.github/workflows/docs-deploy.yml
@@ -35,7 +35,6 @@ jobs:
- run: npm audit --audit-level=critical
- # Will create docs/.vitepress/dist
- run: npm run build
- name: Prepare deployment
diff --git a/.github/workflows/docs-verify-build.yml b/.github/workflows/docs-verify-build.yml
index ac07685f5c..50c24d2733 100644
--- a/.github/workflows/docs-verify-build.yml
+++ b/.github/workflows/docs-verify-build.yml
@@ -1,10 +1,6 @@
name: "Verify build (Docs)"
-# Preflight build of docs. This allows us to ensure that npm run build is
-# succeeding before we merge the PR into main.
-
on:
- # Run on every pull request (open or push to it) that changes docs/
pull_request:
paths:
- "docs/**"
diff --git a/.github/workflows/ensu-android-build.yml b/.github/workflows/ensu-android-build.yml
index 7179138e6d..8dd19912be 100644
--- a/.github/workflows/ensu-android-build.yml
+++ b/.github/workflows/ensu-android-build.yml
@@ -37,8 +37,7 @@ jobs:
shared-key: photos-desktop-ensu-android
save-if: false
- # cargo codegen native builds the uniffi library for the host, which
- # on Linux enables the llama.cpp Vulkan backend.
+ # cargo codegen native enables llama.cpp's Vulkan backend on Linux.
- name: Install Vulkan build dependencies
run: |
sudo apt-get update
diff --git a/.github/workflows/ensu-build.yml b/.github/workflows/ensu-build.yml
index 0eb33b7466..89635d3c97 100644
--- a/.github/workflows/ensu-build.yml
+++ b/.github/workflows/ensu-build.yml
@@ -8,7 +8,7 @@ on:
- "release/ensu-v*"
workflow_dispatch:
schedule:
- # Run every weekday at ~5:45 AM IST
+ # Weekdays at ~5:45 AM IST
- cron: "15 0 * * 1-5"
env:
@@ -101,15 +101,11 @@ jobs:
fail-fast: false
matrix:
platform:
- # Tauri docs recommend building Linux release bundles on the
- # oldest supported runtime OS with WebKitGTK 4.1, so that
- # AppImage/deb/rpm artifacts keep a low glibc baseline.
+ # Ubuntu 22.04 keeps Linux bundles on a low glibc baseline.
- os: ubuntu-22.04
rust-target: x86_64-unknown-linux-gnu
bundle-targets: appimage,deb,rpm
- # A single universal (arm64 + x86_64) build, so that there
- # is one dmg that works on all Macs, and existing installs
- # of either architecture converge onto it via the updater.
+ # One universal build lets both architectures share an updater artifact.
- os: macos-latest
rust-target: universal-apple-darwin
bundle-targets: app,dmg
@@ -141,10 +137,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libsoup-3.0-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- # The llama.cpp Vulkan backend needs the Vulkan loader and the
- # glslc shader compiler at build time. Ubuntu 22.04 has no
- # glslc package, so use the LunarG SDK repository (which
- # llama.cpp's own CI also uses).
+ # Ubuntu 22.04 needs LunarG's repository to provide glslc for llama.cpp.
sudo wget -qO /usr/share/keyrings/lunarg.asc https://packages.lunarg.com/lunarg-signing-key-pub.asc
echo "deb [signed-by=/usr/share/keyrings/lunarg.asc] https://packages.lunarg.com/vulkan jammy main" | sudo tee /etc/apt/sources.list.d/lunarg-vulkan-jammy.list >/dev/null
sudo apt-get update
@@ -331,8 +324,7 @@ jobs:
echo "y" | sdkmanager --install "ndk;${{ env.NDK_VERSION }}"
echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/${{ env.NDK_VERSION }}" >> $GITHUB_ENV
- # cargo codegen native builds the uniffi library for the host, which
- # on Linux enables the llama.cpp Vulkan backend.
+ # cargo codegen native enables llama.cpp's Vulkan backend on Linux.
- name: Install Vulkan build dependencies
run: |
sudo apt-get update
diff --git a/.github/workflows/ensu-ios-build.yml b/.github/workflows/ensu-ios-build.yml
index 02ab5a2426..fba79849be 100644
--- a/.github/workflows/ensu-ios-build.yml
+++ b/.github/workflows/ensu-ios-build.yml
@@ -40,8 +40,7 @@ jobs:
- run: cargo codegen native
working-directory: rust
- # This pull_request workflow does not provide the inference fixtures,
- # so this step is only a build + startup smoke test.
+ # PRs lack inference fixtures, so this only tests build and startup.
- name: Build and test Ensu
working-directory: mobile/native/apple/apps/ensu
run: xcodebuild test -scheme Ensu -destination 'platform=iOS Simulator,name=iPhone 17'
diff --git a/.github/workflows/locker-build.yml b/.github/workflows/locker-build.yml
index 5b525ede2b..4f233eb134 100644
--- a/.github/workflows/locker-build.yml
+++ b/.github/workflows/locker-build.yml
@@ -8,7 +8,7 @@ on:
- "release/locker-v*"
workflow_dispatch:
schedule:
- # Run every weekday at ~4:45 AM IST
+ # Weekdays at ~4:45 AM IST
- cron: "15 23 * * 0-4"
permissions:
diff --git a/.github/workflows/mobile-crowdin-push-sources-and-translations.yml b/.github/workflows/mobile-crowdin-push-sources-and-translations.yml
index aa546c4d3c..4131bb701c 100644
--- a/.github/workflows/mobile-crowdin-push-sources-and-translations.yml
+++ b/.github/workflows/mobile-crowdin-push-sources-and-translations.yml
@@ -1,34 +1,12 @@
name: "Push sources and translations to Crowdin (Mobile)"
-# This is a variant of the mobile Crowdin sync workflows that uploads the
-# translated strings in addition to the source strings.
-#
-# This allows us to change the strings in our source code for an automated
-# refactoring (e.g. renaming a placeholder), and then run this workflow to
-# update the data in Crowdin taking our source code as the source of truth.
-
-# USAGE:
-#
-# Be careful with this workflow since it updates both the sources and
-# translations on Crowdin, and any changes on Crowdin that are not in the
-# branch from which this workflow is run will be lost.
-#
-# 1. Run the normal sync workflow:
-# `gh workflow run mobile-crowdin-sync.yml`
-#
-# 2. Merge the translations PR it creates. So now `main` includes the latest
-# Crowdin translations.
-#
-# 3. Branch from updated `main` and make the string edits.
-#
-# 4. Push the branch and run this workflow
-# `gh workflow run mobile-crowdin-push-sources-and-translations.yml --ref <branch>`
-#
-# 5. After it succeeds, merge the string-edit PR.
+# This overwrites Crowdin sources and translations from the selected branch.
+# To avoid losing Crowdin changes:
+# 1. Run the normal sync and merge its translation PR.
+# 2. Branch from updated main, then edit and push the strings.
+# 3. Run this workflow on that branch, then merge the edit PR.
on:
- # Trigger manually, or using
- # `gh workflow run mobile-crowdin-push-sources-and-translations.yml --ref <my-branch>`
workflow_dispatch:
permissions:
diff --git a/.github/workflows/mobile-crowdin-sync.yml b/.github/workflows/mobile-crowdin-sync.yml
index 1d2bbaaf99..974b2fecec 100644
--- a/.github/workflows/mobile-crowdin-sync.yml
+++ b/.github/workflows/mobile-crowdin-sync.yml
@@ -2,10 +2,8 @@ name: "Sync Crowdin (Mobile)"
on:
schedule:
- # Run Mondays at ~6:20 AM IST
- # See: [Note: Run workflow on specific days of the week]
+ # Mondays at ~6:20 AM IST
- cron: "50 0 * * 1"
- # Also allow manually running the workflow.
workflow_dispatch:
permissions:
diff --git a/.github/workflows/mobile-podfile-lock.yml b/.github/workflows/mobile-podfile-lock.yml
index 5d875cce50..731a003fee 100644
--- a/.github/workflows/mobile-podfile-lock.yml
+++ b/.github/workflows/mobile-podfile-lock.yml
@@ -1,7 +1,5 @@
name: "Verify Podfile.lock (Mobile)"
-# Verify each app's Podfile.lock is in sync with its Flutter plugins.
-
on:
pull_request:
paths:
diff --git a/.github/workflows/photos-build.yml b/.github/workflows/photos-build.yml
index a3a589f4d7..04db1e2b96 100644
--- a/.github/workflows/photos-build.yml
+++ b/.github/workflows/photos-build.yml
@@ -8,7 +8,7 @@ on:
- "release/photos-v*"
workflow_dispatch:
schedule:
- # Run every weekday at ~2:35 AM IST
+ # Weekdays at ~2:35 AM IST
- cron: "5 21 * * 0-4"
permissions:
diff --git a/.github/workflows/photos-desktop-build.yml b/.github/workflows/photos-desktop-build.yml
index 8723eea773..1e880d9326 100644
--- a/.github/workflows/photos-desktop-build.yml
+++ b/.github/workflows/photos-desktop-build.yml
@@ -8,7 +8,7 @@ on:
- "release/photos-desktop-v*"
workflow_dispatch:
schedule:
- # Run every weekday at ~6:45 AM IST
+ # Weekdays at ~6:45 AM IST
- cron: "15 1 * * 1-5"
permissions:
@@ -120,15 +120,7 @@ jobs:
- name: Create universal ffmpeg binaries for macOS
if: startsWith(matrix.os, 'macos')
- # Currently, the ffmpeg-static binaries are not universal (Not
- # their fault, we thank them for their useful package, the issue
- # is that there don't seem to be well known upstream sources that
- # provide a universal binary).
- #
- # As a workaround, we invoke ffmpeg-static twice to download both
- # the Intel and ARM binaries, and combine them into a single
- # universal binary using lipo.
- #
+ # ffmpeg-static ships each macOS architecture separately; combine them with lipo.
run: |
rm -f node_modules/ffmpeg-static/ffmpeg
npm_config_arch=arm64 node node_modules/ffmpeg-static/install.js
@@ -141,7 +133,6 @@ jobs:
- name: Install libarchive-tools for pacman build
if: startsWith(matrix.os, 'ubuntu')
- # https://github.com/electron-userland/electron-builder/issues/4181
run: sudo apt-get update && sudo apt-get install libarchive-tools
- name: Build
diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml
index 674cce5ff6..259935f99c 100644
--- a/.github/workflows/rust-test.yml
+++ b/.github/workflows/rust-test.yml
@@ -53,7 +53,7 @@ jobs:
cache-directories: rust/.cache
- run: cargo test --locked --features museum,ente-photos/ml-assets
- # GITHUB_TOKEN lifts GitHub API rate limit when fetching
- # postgresql_embedded binaries.
+ # postgresql_embedded downloads its binaries from GitHub.
+ # GITHUB_TOKEN raises the API rate limit for those downloads.
env:
GITHUB_TOKEN: ${{ github.token }}
diff --git a/.github/workflows/server-publish-ghcr.yml b/.github/workflows/server-publish-ghcr.yml
index 83f6657db9..3aea818ad1 100644
--- a/.github/workflows/server-publish-ghcr.yml
+++ b/.github/workflows/server-publish-ghcr.yml
@@ -1,10 +1,9 @@
name: "Publish GHCR (Server)"
on:
- # Run automatically on 15th of every month, at 05:00 UTC.
schedule:
+ # Monthly on the 15th at ~10:30 AM IST
- cron: '0 5 15 * *'
- # Run manually if needed to publish out of schedule.
workflow_dispatch:
permissions:
diff --git a/.github/workflows/warm-caches.yml b/.github/workflows/warm-caches.yml
index fa6f1fa653..ee4d0be84d 100644
--- a/.github/workflows/warm-caches.yml
+++ b/.github/workflows/warm-caches.yml
@@ -1,21 +1,13 @@
name: "Warm caches"
-# Nightly priming of the caches used by the PR lint workflows.
-#
-# A PR run can only restore caches that were saved on the PR's own ref or on
-# main. The lint workflows never run on main, so anything they save is scoped
-# to their own PR and only churns the repository's shared 10 GB cache pool.
-# Instead, this workflow (which runs on main's ref) saves the caches, and the
-# lint workflows restore them without saving (save-if: false).
-#
-# Each job must mirror the commands, features and RUSTFLAGS of the workflow it
-# primes, otherwise the saved cache will not match what that workflow needs.
+# PR workflows cannot save caches that other PRs can restore.
+# This main-only workflow primes shared caches; consumers use save-if: false.
+# Each job must mirror its consumer's commands, features and RUSTFLAGS.
on:
schedule:
- cron: "17 18 * * *"
- # For bootstrapping the caches (dispatch on main, otherwise the caches get
- # saved against the wrong ref).
+ # Dispatch only on main or caches will be saved against the wrong ref.
workflow_dispatch:
permissions:
@@ -176,7 +168,6 @@ jobs:
- run: cargo codegen native
working-directory: rust
- # Compile the app and tests without running them.
- name: Build Ensu
working-directory: mobile/native/apple/apps/ensu
run: xcodebuild build-for-testing -scheme Ensu -destination 'platform=iOS Simulator,name=iPhone 17'
diff --git a/.github/workflows/web-crowdin-push-sources-and-translations.yml b/.github/workflows/web-crowdin-push-sources-and-translations.yml
index cc35d4e4b1..135d474bab 100644
--- a/.github/workflows/web-crowdin-push-sources-and-translations.yml
+++ b/.github/workflows/web-crowdin-push-sources-and-translations.yml
@@ -1,34 +1,12 @@
name: "Push sources and translations to Crowdin (Web)"
-# This is a variant of web-crowdin-sync.yml that uploads the translated strings in
-# addition to the source strings.
-#
-# This allows us to change the strings in our source code for an automated
-# refactoring (e.g. renaming a key), and then run this workflow to update the
-# data in Crowdin taking our source code as the source of truth.
-
-# USAGE:
-#
-# Be careful with this workflow since it updates both the sources and
-# translations on Crowdin, and any changes on Crowdin that are not in the
-# branch from which this workflow is run will be lost.
-#
-# 1. Run the normal sync workflow:
-# `gh workflow run web-crowdin-sync.yml`
-#
-# 2. Merge the translations PR it creates. So now `main` includes the latest
-# Crowdin translations.
-#
-# 3. Branch from updated `main` and make the string edits.
-#
-# 4. Push the branch and run this workflow
-# `gh workflow run web-crowdin-push-sources-and-translations.yml --ref <branch>`
-#
-# 5. After it succeeds, merge the string-edit PR.
+# This overwrites Crowdin sources and translations from the selected branch.
+# To avoid losing Crowdin changes:
+# 1. Run the normal sync and merge its translation PR.
+# 2. Branch from updated main, then edit and push the strings.
+# 3. Run this workflow on that branch, then merge the edit PR.
on:
- # Trigger manually, or using
- # `gh workflow run web-crowdin-push-sources-and-translations.yml --ref <my-branch>`
workflow_dispatch:
permissions:
diff --git a/.github/workflows/web-crowdin-sync.yml b/.github/workflows/web-crowdin-sync.yml
index 3c5caf7f70..e3c681d267 100644
--- a/.github/workflows/web-crowdin-sync.yml
+++ b/.github/workflows/web-crowdin-sync.yml
@@ -8,24 +8,11 @@ on:
- "web/packages/base/locales/en-US/translation.json"
- "web/crowdin.yml"
schedule:
- # Run Mondays at ~6:00 AM IST
- #
- # [Note: Run workflow on specific days of the week]
- #
- # The last (5th) component of the cron syntax denotes the day of the
- # week, with 0 == SUN and 6 == SAT. So, for example, to run on every TUE
- # and FRI, this can be set to `2,5`.
- #
- # See also: [Note: Run workflow every 24 hours]
+ # Mondays at ~6:00 AM IST
- cron: "20 0 * * 1"
- # Also allow manually running the workflow.
workflow_dispatch:
-# "In order to push translations and create pull requests, the Crowdin GitHub
-# action requires the `GITHUB_TOKEN` to have write permission on the `contents`
-# and `pull-requests`.
-#
-# - https://github.com/crowdin/github-action?tab=readme-ov-file#permissions
+# Crowdin needs both permissions to commit translations and open its PR.
permissions:
contents: write
pull-requests: write
diff --git a/.github/workflows/web-deploy.yml b/.github/workflows/web-deploy.yml
index 27f9b83450..8fa85bc1e6 100644
--- a/.github/workflows/web-deploy.yml
+++ b/.github/workflows/web-deploy.yml
@@ -2,21 +2,8 @@ name: "Deploy (Web)"
on:
schedule:
- # [Note: Run workflow every 24 hours]
- #
- # Run every weekday at ~8:00 AM IST.
- #
- # First field is minute, second is hour of the day. Last is day of week,
- # 0 being Sunday.
- #
- # Add a few minutes of offset to avoid scheduling on exact hourly
- # boundaries (recommended by GitHub to avoid congestion).
- #
- # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- # https://crontab.guru/
- #
+ # Weekdays at ~8:00 AM IST, offset from the hour to avoid congestion.
- cron: "25 2 * * 1-5"
- # Also allow manually running the workflow
workflow_dispatch:
permissions:
diff --git a/.github/workflows/web-lint.yml b/.github/workflows/web-lint.yml
index 1c5368848b..c0b1ff389b 100644
--- a/.github/workflows/web-lint.yml
+++ b/.github/workflows/web-lint.yml
@@ -1,7 +1,6 @@
name: "Lint (Web)"
on:
- # Run on every pull request (open or push to it) that changes web/
pull_request:
paths:
- "web/**"
@@ -17,7 +16,6 @@ on:
permissions:
contents: read
-# Cancel in-progress lint runs when a new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
diff --git a/.github/workflows/web-publish-ghcr.yml b/.github/workflows/web-publish-ghcr.yml
index 6178213504..8c6afebe7f 100644
--- a/.github/workflows/web-publish-ghcr.yml
+++ b/.github/workflows/web-publish-ghcr.yml
@@ -1,10 +1,9 @@
name: "Publish GHCR (Web)"
on:
- # Run automatically every Wednesday, at 07:00 UTC.
schedule:
+ # Wednesdays at 07:00 UTC
- cron: '0 7 * * 3'
- # Run manually if needed to publish out of schedule.
workflow_dispatch:
permissions: