Skip to content

CI for bqmake

CI for bqmake #177

Workflow file for this run

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@v3
- 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)"
'