-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.57 KB
/
build.yaml
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: Build
on:
pull_request: {}
workflow_dispatch:
inputs:
channel:
description: release channel
required: true
default: stable
version:
description: release version
required: true
default: current
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup Crossplane cli
uses: crossplane-contrib/xpkg-action@master
with:
channel: ${{ github.event.inputs.channel }}
version: ${{ github.event.inputs.version }}
command: -h
- name: move crossplane cli
run: "mkdir -p $TARGET_PATH && mv ./crossplane $TARGET_PATH"
env:
TARGET_PATH: "${{ github.workspace }}/bin"
- name: setup jsonnet-fmt
run: |
go install "github.com/google/go-jsonnet/cmd/[email protected]"
echo "$HOME/go/bin" >> "$GITHUB_PATH"
- name: setup jrsonnet
uses: Duologic/tanka-exporter-workflow/.github/actions/jrsonnet-install@main
- name: Build xpkg
run: "make -B build"
shell: bash
env:
CROSSPLANE: '${{ github.workspace }}/bin/crossplane'
- name: Check if file changed
id: changed
uses: tj-actions/verify-changed-files@v20
with:
files: |
!bin
- name: No files changed
if: "${{ steps.changed.outputs.files_changed == 'true' }}"
run: "echo 'Please run `make build`' && exit 1"
env:
CHANGED_FILES: "${{ steps.changed.outputs.changed_files }}"