Skip to content
Merged
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
Prev Previous commit
Next Next commit
Add .github things
  • Loading branch information
disq committed Dec 14, 2022
commit acd9fa68d4061054120951ee48afa6da3379ebe7
2 changes: 2 additions & 0 deletions .github/pr_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ okta:
- plugins/source/okta/**/*
terraform:
- plugins/source/terraform/**/*
vercel:
- plugins/source/vercel/**/*
postgresql:
- plugins/destination/postgresql/**/*
sqlite:
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/source_vercel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Source Plugin Vercel Workflow

on:
pull_request:
paths:
- "plugins/source/vercel/**"
- ".github/workflows/source_vercel.yml"
push:
branches:
- main
paths:
- "plugins/source/vercel/**"
- ".github/workflows/source_vercel.yml"

jobs:
plugins-source-vercel:
timeout-minutes: 30
name: "plugins/source/vercel"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./plugins/source/vercel
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version-file: plugins/source/vercel/go.mod
cache: true
cache-dependency-path: plugins/source/vercel/go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50.1
working-directory: plugins/source/vercel
args: "--config ../../.golangci.yml"
- name: Get dependencies
run: go get -t -d ./...
- name: Build
run: go build .
- name: Test
run: make test
- name: gen
if: github.event_name == 'pull_request'
run: make gen
- name: Fail if generation updated files
if: github.event_name == 'pull_request'
run: test "$(git status -s | wc -l)" -eq 0
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.3-release-cache-${{ hashFiles('plugins/source/vercel/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.19.3-release-cache-plugins-source-vercel
- 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/source/vercel/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/source/vercel/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
1 change: 1 addition & 0 deletions .github/workflows/wait_for_required_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
"plugins/source/tailscale",
"plugins/source/terraform",
"plugins/source/test",
"plugins/source/vercel",

"plugins/destination/postgresql",
"plugins/destination/test",
Expand Down