Skip to content

armgit / ente

Public Imported from GitHub
0

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

Verify GHCR server release source

Neeraj Guptaa578f8462f5a
diff --git a/.github/workflows/server-publish-ghcr.yml b/.github/workflows/server-publish-ghcr.yml
index 3aea818ad1..4ae8494ab0 100644
--- a/.github/workflows/server-publish-ghcr.yml
+++ b/.github/workflows/server-publish-ghcr.yml
@@ -7,6 +7,7 @@ on:
workflow_dispatch:
permissions:
+ actions: read
contents: read
packages: write
@@ -15,9 +16,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Determine commit from prod museum
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
museum_commit="$(curl -s https://api.ente.com/ping | jq -r .id)"
[[ "${museum_commit}" =~ ^[0-9a-f]{40}$ ]]
+ [[ "$(gh run list \
+ --repo "${GITHUB_REPOSITORY}" \
+ --workflow server-release.yml \
+ --commit "${museum_commit}" \
+ --status success \
+ --limit 1 \
+ --json databaseId \
+ --jq length)" -gt 0 ]]
echo "museum_commit=${museum_commit}" >> $GITHUB_ENV
- name: Checkout prod museum commit