-
Notifications
You must be signed in to change notification settings - Fork 396
60 lines (51 loc) · 1.58 KB
/
schema.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
name: Provider schema
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
inputs:
base:
description: "Base ref"
default: "main"
required: true
head:
description: "Head ref"
default: "main"
required: true
jobs:
compute_diff:
runs-on: ubuntu-latest
steps:
# Check out the base commit first and the head commit second. diff-schema
# uses the current commit as the head commit.
- if: github.event_name == 'pull_request'
name: Checkout PR base commit
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- if: github.event_name == 'pull_request'
name: Checkout PR merge commit
uses: actions/checkout@v4
- if: github.event_name == 'workflow_dispatch'
name: Checkout base commit
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.base }}
- if: github.event_name == 'workflow_dispatch'
name: Checkout head commit
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.head }}
- name: "Setup Go"
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: "Setup Terraform"
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
- name: "Install jd"
run: go install github.com/josephburnett/[email protected]
- run: make diff-schema
env:
BASE_COMMIT: ${{ github.event_name == 'pull_request' && github.base_ref || github.event.inputs.base }}