Skip to content

Sepa Precios Archiver #4540

Sepa Precios Archiver

Sepa Precios Archiver #4540

name: Sepa Precios Archiver
on:
schedule:
- cron: "0 */3 * * *" # Run every 3 hours
workflow_dispatch: # Allow manual trigger
jobs:
archive-prices:
if: >-
github.event_name == 'schedule' ||
(github.event_name == 'workflow_dispatch' &&
github.actor == github.repository_owner &&
github.ref == 'refs/heads/master')
runs-on: [self-hosted, Linux, X64, preciazo-archiver, trusted]
permissions: {}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
- name: Run archiver script
env:
GITHUB_TOKEN: ${{ secrets.ARCHIVE_GITHUB_TOKEN }}
B2_BUCKET_NAME: ${{ secrets.B2_BUCKET_NAME }}
B2_BUCKET_KEY_ID: ${{ secrets.B2_BUCKET_KEY_ID }}
B2_BUCKET_KEY: ${{ secrets.B2_BUCKET_KEY }}
run: |
cd sepa
bun install --frozen-lockfile --production --linker=isolated
bun archiver.ts