-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix S3 wrong mime-type of the .qcow2 image file
Use s3cmd for uploading the pre-built images, to fix the previous action wrong mime-type.
- Loading branch information
1 parent
b3608c7
commit 0230168
Showing
1 changed file
with
18 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,11 +39,13 @@ jobs: | |
- qemu.rl | ||
needs: | ||
- core-version | ||
env: | ||
DO_SPACE_NAME: 'ns8' | ||
DO_SPACE_REGION: 'ams3' | ||
if: needs.core-version.outputs.is_stable == 'true' | ||
steps: | ||
- name: Setup s3cmd | ||
uses: s3-actions/[email protected] | ||
with: | ||
access_key: ${{ secrets.DO_SPACE_ACCESS_KEY }} | ||
secret_key: ${{ secrets.DO_SPACE_SECRET_KEY }} | ||
- name: Setup `packer` | ||
uses: hashicorp/setup-packer@main | ||
- uses: actions/checkout@v4 | ||
|
@@ -71,30 +73,16 @@ jobs: | |
cd $(dirname ${{ steps.qcow2.outputs.path }}) | ||
sha256sum $(basename ${{ steps.qcow2.outputs.path }}) > ../CHECKSUM | ||
sha256sum $(basename ${{ steps.vmdk.outputs.path }}) >> ../CHECKSUM | ||
- name: Upload qcow2 NS8 image | ||
uses: BetaHuhn/do-spaces-action@v2 | ||
with: | ||
access_key: ${{ secrets.DO_SPACE_ACCESS_KEY }} | ||
secret_key: ${{ secrets.DO_SPACE_SECRET_KEY }} | ||
space_name: ${{ env.DO_SPACE_NAME }} | ||
space_region: ${{ env.DO_SPACE_REGION }} | ||
source: ${{ steps.qcow2.outputs.path }} | ||
out_dir: ns8-images | ||
- name: Upload vmdk NS8 image | ||
uses: BetaHuhn/do-spaces-action@v2 | ||
with: | ||
access_key: ${{ secrets.DO_SPACE_ACCESS_KEY }} | ||
secret_key: ${{ secrets.DO_SPACE_SECRET_KEY }} | ||
space_name: ${{ env.DO_SPACE_NAME }} | ||
space_region: ${{ env.DO_SPACE_REGION }} | ||
source: ${{ steps.vmdk.outputs.path }} | ||
out_dir: ns8-images | ||
- name: Upload checksum | ||
uses: BetaHuhn/do-spaces-action@v2 | ||
with: | ||
access_key: ${{ secrets.DO_SPACE_ACCESS_KEY }} | ||
secret_key: ${{ secrets.DO_SPACE_SECRET_KEY }} | ||
space_name: ${{ env.DO_SPACE_NAME }} | ||
space_region: ${{ env.DO_SPACE_REGION }} | ||
source: CHECKSUM | ||
out_dir: ns8-images | ||
- name: Upload images with s3cmd | ||
run: > | ||
s3cmd put | ||
--host ams3.digitaloceanspaces.com | ||
--verbose | ||
--progress | ||
--acl-public | ||
--guess-mime-type | ||
--mime-type=application/octet-stream | ||
${{ steps.qcow2.outputs.path }} | ||
${{ steps.vmdk.outputs.path }} | ||
CHECKSUM | ||
s3://ns8/ns8-images |