Skip to content

Commit bfa23bf

Browse files
committed
test schedule
1 parent b4de00e commit bfa23bf

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/schedule_2.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Data Stack To Go - Daily Job
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *' # Runs at 2 AM UTC every day
6+
workflow_dispatch: # Allows manual triggering
7+
8+
jobs:
9+
setup_environment:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.9'
19+
20+
- name: Create .env file and service_account.json
21+
run: |
22+
echo "AUTH_URL=${{ secrets.AUTH_URL }}" >> .env
23+
echo "BASE_URL=${{ secrets.BASE_URL }}" >> .env
24+
echo "WEBSITE_ID=${{ secrets.WEBSITE_ID }}" >> .env
25+
echo "CLIENT_ID=${{ secrets.CLIENT_ID }}" >> .env
26+
echo "CLIENT_SECRET=${{ secrets.CLIENT_SECRET }}" >> .env
27+
echo "DUCKDB_PATH=${{ secrets.DUCKDB_PATH }}" >> .env
28+
echo "INPUT_FILES_PATH=${{ secrets.INPUT_FILES_PATH }}" >> .env
29+
echo "SPREADSHEET_ID=${{ secrets.SPREADSHEET_ID }}" >> .env
30+
echo '${{ secrets.SERVICE_ACCOUNT_FILE }}' > ./reporting/service_account.json
31+
32+
build_services:
33+
runs-on: ubuntu-latest
34+
needs: setup_environment
35+
steps:
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v2
38+
39+
- name: Build Docker services
40+
run: make build
41+
42+
run_services:
43+
runs-on: ubuntu-latest
44+
needs: build_services
45+
steps:
46+
- name: Run services and stop container
47+
run: |
48+
set -e
49+
make run
50+
make stop

0 commit comments

Comments
 (0)