Skip to content

Commit

Permalink
refactor!: complete rewrite
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Braun <rainbowstack@gmail.com>
  • Loading branch information
bluebrown committed Jan 16, 2024
1 parent f009b6d commit 57bcecb
Show file tree
Hide file tree
Showing 272 changed files with 8,668 additions and 6,179 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
COMPOSE_PROJECT_NAME=kobold
COMPOSE_FILE=build/compose.yaml
KOBOLD_CONFIG=testdata/kobold.toml
SKAFFOLD_FILENAME=e2e/skaffold.yaml
5 changes: 3 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
PATH_add bin
dotenv_if_exists
dotenv .env
dotenv_if_exists .local/.env
PATH_add .local/bin
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
13 changes: 13 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "go",
"changelog-path": ".github/CHANGELOG.md",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false
}
}
}
3 changes: 3 additions & 0 deletions .github/release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.2.4"
}
33 changes: 0 additions & 33 deletions .github/release.sh

This file was deleted.

45 changes: 23 additions & 22 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
name: check

on:
workflow_dispatch: {}
pull_request: {}
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- main

permissions:
contents: read
pull-requests: read

jobs:
validation:
check:
name: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with: {go-version: "1.20"}
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-go@v4
with:
go-version: '1.21.5'
cache: false

- name: Install dependencies
run: go mod download
- name: install deps
run: go mod download

- name: Run all checks
run: make -j check
- name: run checks
run: make check

- name: Build artifacts
run: make -j artifacts
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
only-new-issues: true
install-mode: "binary"
22 changes: 0 additions & 22 deletions .github/workflows/pages.yaml

This file was deleted.

71 changes: 33 additions & 38 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,41 @@
name: release

on:
workflow_dispatch:
inputs:
preRelease:
description: Create a pre release, if set
type: boolean
default: false
workflow_dispatch: {}
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set git config
run: |
git config --global user.email "noreply@bluebrown.github.io"
git config --global user.name "GitHub Actions"
- name: Login to the container registry
run: docker login --username bluebrown --password ${{secrets.DOCKERHUB_TOKEN}}

- name: Set up Go
uses: actions/setup-go@v4
with: {go-version: "1.21"}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Create a github release
run: make -j github-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRE_RELEASE: ${{ github.event.inputs.preRelease == 'true' && '1' || '0' }}

- name: Publish docs
run: make -j github-pages
if: github.events.inputs.preRelease != 'true'
- id: release
uses: google-github-actions/release-please-action@v4
with:
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json

- if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v3

- if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-go@v4
with:
go-version: '1.21.5'

- if: ${{ steps.release.outputs.release_created }}
env:
RELEASE_TAG: ${{ steps.release.outputs.tag_name }}
DOCKER_BUILDKIT: "1"
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker login --username bluebrown --password "$DOCKERHUB_TOKEN"
bash build/artifacts.sh
gh release upload ${{ steps.release.outputs.tag_name }} .artifacts/*
docker push docker.io/bluebrown/kobold --all-tags
12 changes: 5 additions & 7 deletions .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: triage

on:
issues:
types:
- opened

- opened
jobs:
label_issue:
runs-on: ubuntu-latest
steps:
- run: gh issue edit $ISSUE_URL --add-label "triage"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}
- run: gh issue edit $ISSUE_URL --add-label "triage"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}
14 changes: 2 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
/.dump/
/.out/
/.dist/

/bin/*

.env
!/manifests/base/etc/.env
!/manifests/example/etc/.env
!/e2e/kobold/etc/.env

dockerconfig.json
.artifacts/
.local/
7 changes: 0 additions & 7 deletions .vscode/settings.json

This file was deleted.

35 changes: 25 additions & 10 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
Copyright (C) 2022 by Nico Braun <rainbowstack@gmail.com>
Copyright (c) 2023 Nico Braun. All rights reserved.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the project name nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 57bcecb

Please sign in to comment.