Skip to content

temp: test s3 upload #7

temp: test s3 upload

temp: test s3 upload #7

Workflow file for this run

name: Test S3 Upload
on:
push:
branches:
- use-aws-oidc
workflow_dispatch:
jobs:
sync-to-s3:
runs-on: ubuntu-latest
environment: production
permissions:
id-token: write
contents: read
steps:
- name: Check if SECRET is defined
run: |
if [[ -z "${{ secrets.AWS_ROLE_ARN }}" ]]; then
echo "MY_SECRET is NOT defined!"
else
echo "MY_SECRET is defined!"
fi
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Create test folder and files
run: |
mkdir -p test-folder
echo "File 1 content" > test-folder/file1.txt
echo "File 2 content" > test-folder/file2.txt
echo "File 3 content" > test-folder/file3.txt
- name: Sync folder to S3
run: aws s3 sync test-folder s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-ide/test-upload-folder