Skip to content

Commit 476b2cd

Browse files
committed
initial commit
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
0 parents  commit 476b2cd

File tree

10 files changed

+717
-0
lines changed

10 files changed

+717
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug Report
3+
about: Help us diagnose and fix bugs
4+
labels: bug
5+
---
6+
<!--
7+
Thank you for helping to improve Crossplane!
8+
9+
Please be sure to search for open issues before raising a new one. We use issues
10+
for bug reports and feature requests. Please find us at https://slack.crossplane.io
11+
for questions, support, and discussion.
12+
-->
13+
14+
### What happened?
15+
<!--
16+
Please let us know what behaviour you expected and how it diverged
17+
from that behaviour.
18+
-->
19+
20+
21+
### How can we reproduce it?
22+
<!--
23+
Help us to reproduce your bug as succinctly and precisely as possible. Artifacts
24+
such as example manifests or a script that triggers the issue are highly
25+
appreciated!
26+
-->
27+
28+
### What environment did it happen in?
29+
Version:
30+
31+
<!--
32+
Include at least the version or commit of Crossplane you were running. Consider
33+
also including your:
34+
35+
* Cloud provider or hardware configuration
36+
* Kubernetes version (use `kubectl version`)
37+
* Kubernetes distribution (e.g. Tectonic, GKE, OpenShift)
38+
* OS (e.g. from /etc/os-release)
39+
* Kernel (e.g. `uname -a`)
40+
-->
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature Request
3+
about: Help us make this more useful
4+
labels: enhancement
5+
---
6+
<!--
7+
Thank you for helping to improve Crossplane!
8+
9+
Please be sure to search for open issues before raising a new one. We use issues
10+
for bug reports and feature requests. Please find us at https://slack.crossplane.io
11+
for questions, support, and discussion.
12+
-->
13+
14+
### What problem are you facing?
15+
<!--
16+
Please tell us a little about your use case - it's okay if it's hypothetical!
17+
Leading with this context helps frame the feature request so we can ensure we
18+
implement it sensibly.
19+
--->
20+
21+
### How could this help solve your problem?
22+
<!--
23+
Let us know how you think this could help with your use case.
24+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--
2+
Thank you for helping to improve Crossplane!
3+
4+
Please read through https://git.io/fj2m9 if this is your first time opening a
5+
Crossplane pull request. Find us in https://slack.crossplane.io/messages/dev if
6+
you need any help contributing.
7+
-->
8+
9+
### Description of your changes
10+
11+
<!--
12+
Briefly describe what this pull request does, and how it is covered by tests.
13+
Be proactive - direct your reviewers' attention to anything that needs special
14+
consideration.
15+
16+
You MUST either [x] check or ~strikethrough~ every item in the checklist below.
17+
18+
We love pull requests that fix an open issue. If yours does, use the below line
19+
to indicate which issue it fixes, for example "Fixes #500".
20+
-->
21+
22+
Fixes #
23+
24+
I have:
25+
26+
- [ ] Read and followed Crossplane's [contribution process].
27+
- [ ] Added or updated unit tests for my change.
28+
29+
[contribution process]: https://git.io/fj2m9
30+
[docs]: https://docs.crossplane.io/contribute/contribute

.github/workflows/ci.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request: {}
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: Release version (e.g. v0.1.0)
13+
required: false
14+
15+
env:
16+
# Common versions
17+
GO_VERSION: '1.23.6'
18+
GOLANGCI_VERSION: 'v1.62.0'
19+
DOCKER_BUILDX_VERSION: 'v0.23.0'
20+
21+
IMAGE_NAME: ghcr.io/${{ github.repository }}
22+
IMAGE_VERSION: ${{ inputs.version }}
23+
24+
jobs:
25+
lint:
26+
runs-on: ubuntu-24.04
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Go
32+
uses: actions/setup-go@v5
33+
with:
34+
go-version: ${{ env.GO_VERSION }}
35+
cache: false # The golangci-lint action does its own caching.
36+
37+
- name: Check go mod tidy
38+
run: go mod tidy && git diff --exit-code go.mod go.sum
39+
40+
- name: Lint
41+
uses: golangci/golangci-lint-action@v6
42+
with:
43+
version: ${{ env.GOLANGCI_VERSION }}
44+
45+
unit-test:
46+
runs-on: ubuntu-24.04
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
51+
- name: Setup Go
52+
uses: actions/setup-go@v5
53+
with:
54+
go-version: ${{ env.GO_VERSION }}
55+
56+
- name: Run Unit Tests
57+
run: go test -v -cover ./...
58+
59+
build-and-push:
60+
runs-on: ubuntu-24.04
61+
strategy:
62+
fail-fast: true
63+
steps:
64+
- name: Setup QEMU
65+
uses: docker/setup-qemu-action@v3
66+
with:
67+
platforms: all
68+
69+
- name: Setup Docker Buildx
70+
uses: docker/setup-buildx-action@v3
71+
with:
72+
version: ${{ env.DOCKER_BUILDX_VERSION }}
73+
install: true
74+
75+
- name: Checkout
76+
uses: actions/checkout@v4
77+
78+
- name: Login to GHCR
79+
uses: docker/login-action@v3
80+
with:
81+
registry: ghcr.io
82+
username: ${{ github.repository_owner }}
83+
password: ${{ secrets.GITHUB_TOKEN }}
84+
85+
# If a version wasn't explicitly passed as a workflow_dispatch input we
86+
# default to version v0.0.0-<git-commit-date>-<git-short-sha>, for example
87+
# v0.0.0-20231101115142-1091066df799. This is a simple implementation of
88+
# Go's pseudo-versions: https://go.dev/ref/mod#pseudo-versions.
89+
- name: Set Default Multi-Platform Image Version
90+
if: env.IMAGE_VERSION == ''
91+
run: echo "IMAGE_VERSION=v0.0.0-$(date -d@$(git show -s --format=%ct) +%Y%m%d%H%M%S)-$(git rev-parse --short=12 HEAD)" >> $GITHUB_ENV
92+
93+
- name: Build and Push Multi-Platform OCI Image
94+
uses: docker/build-push-action@v6
95+
with:
96+
context: .
97+
platforms: linux/amd64,linux/arm64
98+
cache-from: type=gha
99+
cache-to: type=gha,mode=max
100+
target: image
101+
build-args:
102+
GO_VERSION=${{ env.GO_VERSION }}
103+
push: ${{ github.event_name != 'pull_request' }}
104+
tags: |
105+
${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# If you prefer the allow list template instead of the deny list, see community template:
2+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3+
#
4+
# Binaries for programs and plugins
5+
*.exe
6+
*.exe~
7+
*.dll
8+
*.so
9+
*.dylib
10+
11+
# Test binary, built with `go test -c`
12+
*.test
13+
14+
# Output of the go coverage tool, specifically when used with LiteIDE
15+
*.out
16+
17+
# Dependency directories (remove the comment below to include it)
18+
# vendor/
19+
20+
# Go workspace file
21+
go.work
22+
23+
# IDE
24+
.idea
25+
.idea/**

0 commit comments

Comments
 (0)