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

33 lines
931 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:
runs-on: ubuntu-latest
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-08-24 19:52:49 +00:00
- name: Setup upterm session
uses: lhotari/action-upterm@v1
with:
## limits ssh access and adds the ssh public key for the user which triggered the workflow
limit-access-to-actor: true
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