Skip to content

Commit

Permalink
Organize codebase
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Feb 25, 2024
1 parent 4c328ed commit d43a409
Show file tree
Hide file tree
Showing 642 changed files with 17,557 additions and 73,696 deletions.
18 changes: 18 additions & 0 deletions .github/.kodiak.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version = 1

[merge]
method = "squash" # default: "merge"
delete_branch_on_merge = true # default: false
optimistic_updates = true # default: true
prioritize_ready_to_merge = true # default: false

[merge.message]
title = "pull_request_title" # default: "github_default"
body = "github_default" # default: "github_default"
strip_html_comments = true # default: false

[update]
always = true # default: false

[approve]
auto_approve_usernames = ["1gtm", "tamalsaha"]
40 changes: 0 additions & 40 deletions .github/workflows/ci-docs-only.yaml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/ci.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
pull_request:
branches:
- '*'
push:
branches:
- master
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:

- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: '1.21'
id: go

- uses: actions/checkout@v2

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1

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

- name: Run checks
run: |
make ci
39 changes: 0 additions & 39 deletions .github/workflows/goreleaser.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/workflows/image.yaml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/release-tracker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release-tracker

on:
pull_request:
types: [closed]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v1

- name: Prepare git
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
run: |
git config --global user.name "${GITHUB_USER}"
git config --global user.email "${GITHUB_USER}@appscode.com"
git remote set-url origin https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
- name: Install GitHub CLI
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
sudo mv bin/hub /usr/local/bin
- name: Update release tracker
if: |
github.event.action == 'closed' &&
github.event.pull_request.merged == true
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
run: |
./hack/scripts/update-release-tracker.sh
86 changes: 86 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Release

on:
push:
tags:
- "*.*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1

- name: Print version info
id: semver
run: |
make version
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1

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

- name: Log in to the GitHub Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.LGTM_GITHUB_TOKEN }}

- name: Build
env:
APPSCODE_ENV: prod
run: |
make release COMPRESS=yes
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bin/kubectl-connect-darwin-amd64.tar.gz
bin/kubectl-connect-darwin-arm64.tar.gz
bin/kubectl-connect-linux-amd64.tar.gz
bin/kubectl-connect-linux-arm.tar.gz
bin/kubectl-connect-linux-arm64.tar.gz
bin/kubectl-connect-windows-amd64.zip
bin/kubectl-connect-checksums.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install GitHub CLI
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
sudo mv bin/hub /usr/local/bin
- name: Clone krew-index repository
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
run: |
KREW_INDEX_REPOSITORY=github.com/appscode/krew-index
url="https://${GITHUB_USER}:${GITHUB_TOKEN}@${KREW_INDEX_REPOSITORY}.git"
cd $RUNNER_WORKSPACE
git clone $url
cd $(basename $KREW_INDEX_REPOSITORY)
git config user.name "${GITHUB_USER}"
git config user.email "${GITHUB_USER}@appscode.com"
- name: Publish krew manifest
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
if: startsWith(github.event.ref, 'refs/tags/') && (contains(github.ref, '-alpha.') || contains(github.ref, '-beta.') || contains(github.ref, '-rc.')) == false
run: |
cd $RUNNER_WORKSPACE/krew-index
./hack/scripts/open-pr.sh $GITHUB_WORKSPACE dba
Loading

0 comments on commit d43a409

Please sign in to comment.