-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 1.16 KB
/
ci.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
name: dry-run
run-name: CI for bqmake
on: [push, workflow_dispatch]
jobs:
dry-run:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: package-lock.json
- uses: 'google-github-actions/auth@v1'
id: 'auth'
with:
workload_identity_provider: 'projects/1069005224497/locations/global/workloadIdentityPools/github-action/providers/github-action'
service_account: 'github-action@bqmake.iam.gserviceaccount.com'
- run: npm ci
- shell: bash
run: |
find ./bigquery -type f | npx bqport push --format=json --dry-run | jq -r '
select(.error and (.error | test("Suspended:") | not))
| .line = ((.error | capture("\\[(?<line>\\d+):(?<column>\\d+)\\]$")).line? // "1")
# workaround
| .name = (.name | gsub("bqmake"; "bigquery/@default") | gsub("(?<x>@[^/]+)"; "\(.x | ascii_downcase)"))
| @text "::error file=\(.name),line=\(.line)::\(.error)"
'