From 136faff37b59cb6899e56f621df212d09d161438 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad <99736+nabeelio@users.noreply.github.com> Date: Mon, 10 Aug 2026 17:18:02 -0500 Subject: [PATCH] ci(release): publish to Bunny storage instead of DO Spaces Bunny's S3-compatible API replaces the DO Spaces action. The doctl CDN purge steps go away with it; Bunny purging needs its own API key. --- .github/workflows/distribute.yml | 68 +++++++++----------------------- 1 file changed, 18 insertions(+), 50 deletions(-) diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index 9db189c..a56e105 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -69,32 +69,16 @@ jobs: with: name: acars-package - - uses: BetaHuhn/do-spaces-action@latest - with: - access_key: ${{ secrets.SPACE_ACCESS_KEY}} - secret_key: ${{ secrets.SPACE_SECRET_KEY }} - space_name: ${{ secrets.SPACE_NAME }} - space_region: ${{ secrets.SPACE_REGION }} - cdn_domain: ${{ secrets.SPACE_CDN_DOMAIN }} - source: stable.zip - out_dir: scripts - - - name: install doctl - uses: digitalocean/action-doctl@v2 - with: - token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} - - - name: purge CDN cache - continue-on-error: true + - name: upload to Bunny storage + env: + AWS_ACCESS_KEY_ID: acars + AWS_SECRET_ACCESS_KEY: ${{ secrets.BUNNY_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-east-1 + # AWS CLI v2.23+ sends checksum headers many S3-compatible stores reject + AWS_REQUEST_CHECKSUM_CALCULATION: when_required run: | - CDN_ID=$(doctl compute cdn list --format ID,Origin --no-header \ - | grep -F "${{ secrets.SPACE_NAME }}.${{ secrets.SPACE_REGION }}.digitaloceanspaces.com" \ - | awk '{print $1}') - if [ -z "$CDN_ID" ]; then - echo "No CDN endpoint found for this space, skipping purge" - exit 0 - fi - doctl compute cdn flush "$CDN_ID" --files "scripts/stable.zip" + aws s3 cp stable.zip s3://acars/scripts/stable.zip \ + --endpoint-url https://ny-s3.storage.bunnycdn.com # # Manually triggered: bump the version, tag it, and publish a GitHub release @@ -145,32 +129,16 @@ jobs: filename: '../stable.zip' exclusions: '' - - uses: BetaHuhn/do-spaces-action@latest - with: - access_key: ${{ secrets.SPACE_ACCESS_KEY}} - secret_key: ${{ secrets.SPACE_SECRET_KEY }} - space_name: ${{ secrets.SPACE_NAME }} - space_region: ${{ secrets.SPACE_REGION }} - cdn_domain: ${{ secrets.SPACE_CDN_DOMAIN }} - source: stable.zip - out_dir: scripts - - - name: install doctl - uses: digitalocean/action-doctl@v2 - with: - token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} - - - name: purge CDN cache - continue-on-error: true + - name: upload to Bunny storage + env: + AWS_ACCESS_KEY_ID: acars + AWS_SECRET_ACCESS_KEY: ${{ secrets.BUNNY_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-east-1 + # AWS CLI v2.23+ sends checksum headers many S3-compatible stores reject + AWS_REQUEST_CHECKSUM_CALCULATION: when_required run: | - CDN_ID=$(doctl compute cdn list --format ID,Origin --no-header \ - | grep -F "${{ secrets.SPACE_NAME }}.${{ secrets.SPACE_REGION }}.digitaloceanspaces.com" \ - | awk '{print $1}') - if [ -z "$CDN_ID" ]; then - echo "No CDN endpoint found for this space, skipping purge" - exit 0 - fi - doctl compute cdn flush "$CDN_ID" --files "scripts/stable.zip" + aws s3 cp stable.zip s3://acars/scripts/stable.zip \ + --endpoint-url https://ny-s3.storage.bunnycdn.com - name: Create GitHub release uses: softprops/action-gh-release@v2