refactor(github): change script to github actions #1
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
name: Reusable workflow for upload file to S3 | |
on: | |
workflow_call: | |
secrets: | |
BUCKET_URL: | |
required: true | |
BUCKET_USERNAME: | |
required: true | |
BUCKET_PASSWORD: | |
required: true | |
BUCKET_NAME: | |
required: true | |
inputs: | |
binary_name: | |
type: string | |
default: mdrop | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ inputs.binary_name }}-build-artifact | |
- name: Check file | |
run: | | |
pwd | |
ls -lah | |
- name: Install curl + openssl | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y curl openssl | |
- name: Upload file | |
uses: shallwefootball/upload-s3-action | |
with: | |
endpoint: ${{ secrets.BUCKET_URL }} | |
aws_key_id: ${{ secrets.BUCKET_USERNAME }} | |
aws_secret_access_key: ${{ secrets.BUCKET_PASSWORD }} | |
aws_bucket: ${{ secrets.BUCKET_NAME }} | |
source_dir: ./${{ inputs.binary_name }} |