Skip to content

Commit 2171fe7

Browse files
authored
Use S3 packaging/ prefix and download.valkey.io URL (#51)
Adapt the packaging workflow to use the existing S3 bucket with a /packaging/ prefix, matching the existing release artifact pattern. - publish-to-s3.sh: sync to s3://${S3_BUCKET}/packaging/ instead of bucket root - publish-repos.sh: list versions from s3://${S3_BUCKET}/packaging/ - packages.yml: use https://download.valkey.io/packaging as REPO_URL (CloudFront-fronted) instead of raw S3 hostname Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
1 parent cf6487d commit 2171fe7

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ jobs:
539539
- name: Generate site
540540
run: |
541541
PAGES_URL="https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
542-
REPO_URL="https://${{ secrets.S3_BUCKET }}.s3.${{ secrets.S3_REGION }}.amazonaws.com"
542+
REPO_URL="https://download.valkey.io/packaging"
543543
bash scripts/publish-repos.sh \
544544
"${{ needs.process-inputs.outputs.version }}" \
545545
"${{ steps.gpg.outputs.fingerprint }}" \
@@ -696,6 +696,6 @@ jobs:
696696
echo "Artifacts are available for download in the Actions tab." >> $GITHUB_STEP_SUMMARY
697697
echo "" >> $GITHUB_STEP_SUMMARY
698698
PAGES_URL="https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
699-
REPO_URL="https://${{ secrets.S3_BUCKET }}.s3.${{ secrets.S3_REGION }}.amazonaws.com"
699+
REPO_URL="https://download.valkey.io/packaging"
700700
echo ":package: **Package repository (S3):** ${REPO_URL}" >> $GITHUB_STEP_SUMMARY
701701
echo ":globe_with_meridians: **Install instructions:** [${PAGES_URL}](${PAGES_URL})" >> $GITHUB_STEP_SUMMARY

scripts/publish-repos.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ mkdir -p "${SITE_DIR}"
2626
################################################################################
2727
# Detect available versions from S3 bucket
2828
################################################################################
29-
echo "Listing versions from s3://${S3_BUCKET}/..."
29+
echo "Listing versions from s3://${S3_BUCKET}/packaging/..."
3030
AVAILABLE_VERSIONS=""
31-
S3_DIRS=$(aws s3 ls "s3://${S3_BUCKET}/" --region "$S3_REGION" 2>/dev/null | awk '/PRE valkey-/ {gsub(/PRE /,""); gsub(/\//,""); print}') || true
31+
S3_DIRS=$(aws s3 ls "s3://${S3_BUCKET}/packaging/" --region "$S3_REGION" 2>/dev/null | awk '/PRE valkey-/ {gsub(/PRE /,""); gsub(/\//,""); print}') || true
3232

3333
for vdir in $S3_DIRS; do
3434
ver="${vdir#valkey-}"

scripts/publish-to-s3.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ gpg --armor --export "$GPG_KEY" > "${STAGING}/GPG-KEY-valkey.asc"
136136
# Upload to S3
137137
################################################################################
138138
echo ""
139-
echo "Uploading to s3://${S3_BUCKET}/..."
139+
echo "Uploading to s3://${S3_BUCKET}/packaging/..."
140140
# Sync without --delete: multiple patch versions (e.g. 9.0.2, 9.0.4)
141141
# share the same repo directory (valkey-9.0/rpm/el9/x86_64/), so
142142
# --delete would remove packages from other patch releases.
143-
aws s3 sync "${STAGING}/" "s3://${S3_BUCKET}/"
143+
aws s3 sync "${STAGING}/" "s3://${S3_BUCKET}/packaging/"
144144
echo "Upload complete."
145-
echo "Packages available at: https://${S3_BUCKET}.s3.${S3_REGION}.amazonaws.com"
145+
echo "Packages available at: https://download.valkey.io/packaging"

0 commit comments

Comments
 (0)