-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (117 loc) · 3.29 KB
/
pull-request.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: PR
on:
pull_request:
branches:
- main
paths-ignore:
- docs/**
- .devcontainer/**
- examples/**
- .github/**
env:
PROVIDER: influxdb3
ORG: komminarlabs
DOTNETVERSION: |
6.0.x
3.1.301
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOVERSION: 1.22.x
NODEVERSION: 20.x
PYTHONVERSION: "3.11"
TF_APPEND_USER_AGENT: pulumi
TRAVIS_OS_NAME: linux
permissions:
checks: write
contents: read
pull-requests: write
jobs:
check_schema:
name: Check Schema
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
cache-dependency-path: |
sdk/go.sum
go-version: 1.22.x
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
tag: v0.0.46
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/actions@v5
with:
pulumi-version: ^3
- name: Provider
run: make provider VERSION=0.0.1-alpha
- name: Install Schema Tools
uses: jaxxstorm/[email protected]
with:
repo: pulumi/schema-tools
- name: Check Schema is Valid
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
{
echo "SCHEMA_CHANGES<<$EOF";
schema-tools compare -r "github://api.github.com/${{ env.ORG }}" -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json;
echo "$EOF";
} >> "$GITHUB_ENV"
- if: github.actor != 'dependabot[bot]'
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment_tag: schemaCheck
message: >+
${{ env.SCHEMA_CHANGES }}
build_sdk:
needs: check_schema
name: Build SDK
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
language:
- nodejs
- python
- dotnet
- go
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v5
with:
cache-dependency-path: |
sdk/go.sum
go-version: 1.22.x
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
tag: v0.0.46
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/actions@v5
with:
pulumi-version: ^3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
- name: Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNETVERSION }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHONVERSION }}
- name: Build
run: make build VERSION=0.0.1-alpha