preciazo/.github/workflows/sepa-precios-archiver.yml

33 lines
865 B
YAML
Raw Normal View History

2024-08-24 03:00:38 +00:00
name: Sepa Precios Archiver
2024-08-24 02:59:02 +00:00
on:
schedule:
- cron: "0 */12 * * *" # Run every 6 hours
workflow_dispatch: # Allow manual trigger
jobs:
archive-prices:
2024-08-30 13:31:10 +00:00
# runs-on: ubicloud-standard-4
runs-on: ubuntu-latest
2024-08-24 02:59:02 +00:00
steps:
- uses: actions/checkout@v4
2024-08-24 14:45:38 +00:00
- uses: oven-sh/setup-bun@v2
2024-08-24 02:59:02 +00:00
with:
bun-version: latest
2024-09-01 19:26:47 +00:00
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
2024-08-25 01:01:28 +00:00
2024-08-24 02:59:02 +00:00
- name: Run archiver script
env:
GITHUB_TOKEN: ${{ secrets.ARCHIVE_GITHUB_TOKEN }}
2024-08-24 14:47:14 +00:00
B2_BUCKET_NAME: ${{ secrets.B2_BUCKET_NAME }}
B2_BUCKET_KEY_ID: ${{ secrets.B2_BUCKET_KEY_ID }}
B2_BUCKET_KEY: ${{ secrets.B2_BUCKET_KEY }}
2024-08-24 02:59:02 +00:00
run: |
cd sepa-precios-archiver
2024-08-24 14:45:38 +00:00
bun install --frozen-lockfile
2024-08-24 02:59:02 +00:00
bun index.ts