Skip to content

Commit cd13b98

Browse files
committed
Change release action to upload to S3 bucket
1 parent e643434 commit cd13b98

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/build_iso.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,19 @@ jobs:
5151
name: ${{ env.FILENAME }}.iso
5252
path: ./image/${{ env.FILENAME }}.iso
5353

54-
- name: Upload ISO to release (only for release events)
54+
- name: Release ISO for public access (only for release events)
5555
if: github.event_name == 'release'
56-
uses: actions/upload-release-asset@v1
57-
with:
58-
upload_url: ${{ github.event.release.upload_url }}
59-
asset_path: ./image/${{ env.FILENAME }}.iso
60-
asset_name: ${{ env.FILENAME }}.iso
61-
asset_content_type: application/octet-stream
56+
run: |
57+
aws s3 --endpoint-url https://fsn1.your-objectstorage.com cp ./image/${{ env.FILENAME }}.iso s3://os2borgerpc/borgerpc-os-images/${{ env.FILENAME }}.iso
58+
env:
59+
AWS_ACCESS_KEY_ID: ${{ secrets.HETZNER_OS2BORGERPC_ACCESS_KEY }}
60+
AWS_SECRET_ACCESS_KEY: ${{ secrets.HETZNER_OS2BORGERPC_SECRET_KEY }}
61+
- name: Add download URL to release notes
62+
if: github.event_name == 'release'
63+
run: |
64+
DOWNLOAD_URL="https://fsn1.your-objectstorage.com/os2borgerpc/borgerpc-os-images/${{ env.FILENAME }}.iso"
65+
curl -X PATCH \
66+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
67+
-H "Content-Type: application/json" \
68+
-d "{\"body\": \"Download the ISO here: $DOWNLOAD_URL\"}" \
69+
https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}

0 commit comments

Comments
 (0)