feat(caddy): upload binary to S3
- Upload the compiled binary to any S3-compatible storage via AWS CLI - Read endpoint, region and bucket from repo variables (S3_ENDPOINT, S3_REGION, S3_BUCKET) - Skip the upload when S3_BUCKET is unset - Document the configuration in README
This commit is contained in:
2 files changed
+29
-1
No files matched your search
@@ -40,4 +40,16 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: caddy-custom-linux-amd64
|
||||
path: caddy
|
||||
path: caddy
|
||||
|
||||
- name: Upload binary to S3
|
||||
if: ${{ vars.S3_BUCKET != '' }}
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
|
||||
AWS_DEFAULT_REGION: ${{ vars.S3_REGION || 'cn-hongkong' }}
|
||||
run: |
|
||||
aws configure set default.s3.addressing_style virtual
|
||||
aws s3 cp caddy "s3://${{ vars.S3_BUCKET }}/caddy-${{ inputs.caddy_version }}-linux-amd64" \
|
||||
--endpoint-url "${{ vars.S3_ENDPOINT }}" \
|
||||
--no-progress
|
||||
Reference in new issue
Block a user