-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.48 KB
/
run.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This is a basic workflow that is manually triggered
name: Run script
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
schedule:
- cron: '0 0 * * *'
push:
branches: develop
jobs:
deploy:
runs-on: ubuntu-latest
name: Build and Deploy
steps:
- name: 'Checkout the source code'
uses: actions/checkout@v2
- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v1
- name: 'Set up Docker Buildx cache'
uses: actions/cache@v2
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: 'Build container image'
run: |
docker buildx build \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache,mode=max \
--platform "linux/amd64" \
-o .reports \
--build-arg BQ_DATASET_ID=${{ secrets.BQ_DATASET_ID }} \
--build-arg BQ_PROJECT_ID=${{ secrets.BQ_PROJECT_ID }} \
--build-arg BQ_PRIVATE_KEY=${{ secrets.BQ_PRIVATE_KEY }} \
--build-arg BQ_CLIENT_ID=${{ secrets.BQ_CLIENT_ID }} \
--build-arg BQ_CLIENT_EMAIL=${{ secrets.BQ_CLIENT_EMAIL }} \
--build-arg RUN_ID=${{ github.run_id }} \
--target "jobs-done" \
--file "./Dockerfile" \
"./"