Skip to content

Commit

Permalink
add input to force syncing comparing the changed date (not only size) (
Browse files Browse the repository at this point in the history
  • Loading branch information
vorotech authored May 14, 2024
1 parent 46f1a75 commit 08ac145
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/upload-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
- master

workflow_dispatch:
inputs:
use-size-only:
description: 'Include --size-only flag in aws s3 sync command'
required: false
default: 'true'

permissions:
id-token: write
Expand All @@ -28,7 +33,12 @@ jobs:
- name: Sync to S3
if: github.repository_owner == 'trustwallet'
shell: bash
run: aws s3 sync . s3://$AWS_S3_BUCKET --follow-symlinks --delete --exclude '*' --include 'dapps/*' --include 'blockchains/*' --size-only
run: |
SYNC_OPTIONS="--follow-symlinks --delete --exclude '*' --include 'dapps/*' --include 'blockchains/*'"
if [ "${{ github.event.inputs.use-size-only }}" == "true" ]; then
SYNC_OPTIONS="$SYNC_OPTIONS --size-only"
fi
aws s3 sync . s3://$AWS_S3_BUCKET $SYNC_OPTIONS
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}

Expand All @@ -49,4 +59,3 @@ jobs:
env:
PATHS: ${{ steps.filter.outputs.paths }}
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION }}

0 comments on commit 08ac145

Please sign in to comment.