Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add reusable validate
  • Loading branch information
candiduslynx committed Apr 10, 2023
commit 655644da77e957a467a9ef925b8530e0303a9679
46 changes: 9 additions & 37 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ on:
paths:
- "cli/**"
- ".github/workflows/cli.yml"
- ".github/workflows/resolve_runner.yml"
- .github/workflows/resolve_runner.yml
- .github/workflows/validate_release.yml
push:
branches:
- main
paths:
- "cli/**"
- ".github/workflows/cli.yml"
- ".github/workflows/resolve_runner.yml"
- .github/workflows/resolve_runner.yml
- .github/workflows/validate_release.yml

jobs:
resolve-runner:
Expand Down Expand Up @@ -59,38 +61,8 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: test "$(git status -s ../website/pages/docs/reference/cli/*.md | wc -l)" -eq 0
validate-release:
timeout-minutes: 30
needs: [resolve-runner]
runs-on: ${{ needs.resolve-runner.outputs.runner }}
env:
CGO_ENABLED: 0
steps:
- name: Checkout
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/checkout@v3
- uses: actions/cache@v3
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.19.5-release-cache-${{ hashFiles('cli/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.19.5-release-cache-cli
- name: Set up Go
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/setup-go@v3
with:
go-version-file: cli/go.mod
- name: Install GoReleaser
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser-pro
version: latest
install-only: true
- name: Run GoReleaser Dry-Run
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
run: goreleaser release --snapshot --clean --skip-validate --skip-publish --skip-sign -f ./cli/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
needs: [ resolve-runner ]
uses: ./.github/workflows/validate_release.yml
with:
path: cli
runner: ${{ needs.resolve-runner.outputs.runner }}
39 changes: 5 additions & 34 deletions .github/workflows/dest_azblob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
paths:
- "plugins/destination/azblob/**"
- ".github/workflows/dest_azblob.yml"
- ".github/workflows/validate_release.yml"
push:
branches:
- main
paths:
- "plugins/destination/azblob/**"
- ".github/workflows/dest_azblob.yml"
- ".github/workflows/validate_release.yml"

jobs:
plugins-destination-azblob:
Expand Down Expand Up @@ -49,37 +51,6 @@ jobs:
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
validate-release:
timeout-minutes: 30
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Checkout
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/checkout@v3
- uses: actions/cache@v3
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.19.5-release-cache-${{ hashFiles('plugins/destination/azblob/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.19.5-release-cache-plugins-destination-azblob
- name: Set up Go
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/setup-go@v3
with:
go-version-file: plugins/destination/azblob/go.mod
- name: Install GoReleaser
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser-pro
version: latest
install-only: true
- name: Run GoReleaser Dry-Run
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
run: goreleaser release --snapshot --clean --skip-validate --skip-publish --skip-sign -f ./plugins/destination/azblob/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
uses: ./.github/workflows/validate_release.yml
with:
path: plugins/destination/azblob
37 changes: 5 additions & 32 deletions .github/workflows/dest_bigquery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
paths:
- "plugins/destination/bigquery/**"
- ".github/workflows/dest_bigquery.yml"
- ".github/workflows/validate_release.yml"
push:
branches:
- main
paths:
- "plugins/destination/bigquery/**"
- ".github/workflows/dest_bigquery.yml"
- ".github/workflows/validate_release.yml"

jobs:
plugins-destination-bigquery:
Expand Down Expand Up @@ -59,35 +61,6 @@ jobs:
BIGQUERY_PROJECT_ID: ${{ secrets.BIGQUERY_TEST_PROJECT_ID }}
BIGQUERY_DATASET_ID: ${{ secrets.BIGQUERY_TEST_DATASET_ID }}
validate-release:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/checkout@v3
- uses: actions/cache@v3
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.19.5-release-cache-${{ hashFiles('plugins/destination/bigquery/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.19.5-release-cache-plugins-destination-bigquery
- name: Set up Go
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/setup-go@v3
with:
go-version-file: plugins/destination/bigquery/go.mod
- name: Install GoReleaser
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser-pro
version: latest
install-only: true
- name: Run GoReleaser Dry-Run
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
run: goreleaser release --snapshot --clean --skip-validate --skip-publish --skip-sign -f ./plugins/destination/bigquery/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
uses: ./.github/workflows/validate_release.yml
with:
path: plugins/destination/bigquery
39 changes: 5 additions & 34 deletions .github/workflows/dest_clickhouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
paths:
- plugins/destination/clickhouse/**
- .github/workflows/dest_clickhouse.yml
- .github/workflows/validate_release.yml
push:
branches:
- main
paths:
- plugins/destination/clickhouse/**
- .github/workflows/dest_clickhouse.yml
- .github/workflows/validate_release.yml

jobs:
plugins-destination-clickhouse:
Expand Down Expand Up @@ -69,37 +71,6 @@ jobs:
CQ_DEST_CH_TEST_CONN: "clickhouse://${{ env.DB_USER }}:${{ env.DB_PASSWORD }}@localhost:9000/${{ env.DB_NAME }}"
run: make test
validate-release:
timeout-minutes: 30
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Checkout
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/checkout@v3
- uses: actions/cache@v3
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.19.4-release-cache-${{ hashFiles('plugins/destination/clickhouse/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.19.4-release-cache-plugins-destination-clickhouse
- name: Set up Go
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/setup-go@v3
with:
go-version-file: plugins/destination/clickhouse/go.mod
- name: Install GoReleaser
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser-pro
version: latest
install-only: true
- name: Run GoReleaser Dry-Run
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
run: goreleaser release --snapshot --rm-dist --skip-validate --skip-publish --skip-sign -f ./plugins/destination/clickhouse/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
uses: ./.github/workflows/validate_release.yml
with:
path: plugins/destination/clickhouse
39 changes: 5 additions & 34 deletions .github/workflows/dest_csv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
paths:
- "plugins/destination/csv/**"
- ".github/workflows/dest_csv.yml"
- .github/workflows/validate_release.yml
push:
branches:
- main
paths:
- "plugins/destination/csv/**"
- ".github/workflows/dest_csv.yml"
- .github/workflows/validate_release.yml

jobs:
plugins-destination-csv:
Expand Down Expand Up @@ -45,37 +47,6 @@ jobs:
- name: Test
run: make test
validate-release:
timeout-minutes: 30
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Checkout
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/checkout@v3
- uses: actions/cache@v3
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.19.5-release-cache-${{ hashFiles('plugins/destination/csv/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.19.5-release-cache-plugins-destination-csv
- name: Set up Go
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/setup-go@v3
with:
go-version-file: plugins/destination/csv/go.mod
- name: Install GoReleaser
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser-pro
version: latest
install-only: true
- name: Run GoReleaser Dry-Run
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
run: goreleaser release --snapshot --clean --skip-validate --skip-publish --skip-sign -f ./plugins/destination/csv/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
uses: ./.github/workflows/validate_release.yml
with:
path: plugins/destination/csv
41 changes: 5 additions & 36 deletions .github/workflows/dest_duckdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
paths:
- "plugins/destination/duckdb/**"
- ".github/workflows/dest_duckdb.yml"
- .github/workflows/validate_release_cgo.yml
push:
branches:
- main
paths:
- "plugins/destination/duckdb/**"
- ".github/workflows/dest_duckdb.yml"
- .github/workflows/validate_release_cgo.yml

jobs:
plugins-destination-duckdb:
Expand Down Expand Up @@ -45,39 +47,6 @@ jobs:
- name: Test
run: make test
validate-release:
timeout-minutes: 30
runs-on: ubuntu-latest
container:
image: ghcr.io/cloudquery/golang-cross:v10.0.0
env:
CGO_ENABLED: 1
steps:
- name: Checkout
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/checkout@v3
- uses: actions/cache@v3
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.19.5-release-cache-${{ hashFiles('plugins/destination/duckdb/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.19.5-release-cache-plugins-destination-duckdb
- name: Set up Go
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/setup-go@v3
with:
go-version-file: plugins/destination/duckdb/go.mod
- name: Install GoReleaser
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser-pro
version: latest
install-only: true
- name: Run GoReleaser Dry-Run
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
run: goreleaser release --snapshot --clean --skip-validate --skip-publish --skip-sign -f ./plugins/destination/duckdb/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
uses: ./.github/workflows/validate_release_cgo.yml
with:
path: plugins/destination/duckdb
37 changes: 5 additions & 32 deletions .github/workflows/dest_elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
paths:
- "plugins/destination/elasticsearch/**"
- ".github/workflows/dest_elasticsearch.yml"
- .github/workflows/validate_release.yml
push:
branches:
- main
paths:
- "plugins/destination/elasticsearch/**"
- ".github/workflows/dest_elasticsearch.yml"
- .github/workflows/validate_release.yml

jobs:
plugins-destination-elasticsearch:
Expand Down Expand Up @@ -59,35 +61,6 @@ jobs:
- name: Test
run: make test
validate-release:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/checkout@v3
- uses: actions/cache@v3
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.19.4-release-cache-${{ hashFiles('plugins/destination/elasticsearch/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.19.4-release-cache-plugins-destination-elasticsearch
- name: Set up Go
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/setup-go@v3
with:
go-version-file: plugins/destination/elasticsearch/go.mod
- name: Install GoReleaser
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser-pro
version: latest
install-only: true
- name: Run GoReleaser Dry-Run
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
run: goreleaser release --snapshot --rm-dist --skip-validate --skip-publish --skip-sign -f ./plugins/destination/elasticsearch/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
uses: ./.github/workflows/validate_release.yml
with:
path: plugins/destination/elasticsearch
Loading