diff --git a/.github/workflows/scrape-woolies.yml b/.github/workflows/scrape-woolies.yml index b835bfa..9eab016 100644 --- a/.github/workflows/scrape-woolies.yml +++ b/.github/workflows/scrape-woolies.yml @@ -3,8 +3,12 @@ on: push: schedule: - cron: "0 1 * * *" # Daily at 1am UTC (12pm AEST) +env: + AWS_REGION: ap-southeast-2 jobs: scrape-woolies: + permissions: + id-token: write # This is required for requesting the JWT runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -13,4 +17,10 @@ jobs: - uses: actions/upload-artifact@v3 with: name: woolies_all - path: ./woolies_all.json \ No newline at end of file + path: ./woolies_all.json + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: "${TARGET_ROLE_ARN}" + aws-region: ap-southeast-2 + - run: aws s3 cp ./woolies_all.json s3://grocery-scrape-au/woolies_all.json \ No newline at end of file