Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ee40d9b
chenge to github actions, instead of circleci
LordOverlord Oct 21, 2024
aafd63a
fixes to the github actions
LordOverlord Oct 21, 2024
b9d3c62
changed GA to avoid tagging
LordOverlord Oct 21, 2024
bb5e743
changed GA to avoid tagging
LordOverlord Oct 21, 2024
6de31ec
changes to GA
LordOverlord Oct 21, 2024
51c8111
updated some dependencies on go.mod
LordOverlord Oct 21, 2024
387cea7
Merge pull request #1 from LordOverlord/dev
LordOverlord Oct 21, 2024
16f4c57
added build for binaries
LordOverlord Oct 21, 2024
302c5ba
changes to releases
LordOverlord Oct 21, 2024
dd4fc3d
changes to releases
LordOverlord Oct 21, 2024
dbfa769
changes to dev releases
LordOverlord Oct 21, 2024
927977c
updated dependency
LordOverlord Oct 21, 2024
7490222
updated version dependency
LordOverlord Oct 21, 2024
044036f
go.mod dependencies
LordOverlord Oct 21, 2024
bfd1315
changed references to bcicen
LordOverlord Oct 21, 2024
7f6ae34
solving dependencies in go
LordOverlord Oct 21, 2024
7284413
solving dependencies
LordOverlord Oct 21, 2024
761444b
dependiencies on go.mod and sum
LordOverlord Oct 21, 2024
34b3940
changes to workflow dev
LordOverlord Oct 21, 2024
8db80a4
change the binaries
LordOverlord Oct 21, 2024
28dd346
change the binaries
LordOverlord Oct 21, 2024
8cbd432
change to versions instead of timestamp
LordOverlord Oct 21, 2024
6e65fa4
change tags
LordOverlord Oct 21, 2024
6f85c57
change to versions instead of timestamp
LordOverlord Oct 21, 2024
fa78817
Merge pull request #2 from LordOverlord/dev
LordOverlord Oct 21, 2024
031dfc1
rework ga master
LordOverlord Oct 21, 2024
082c401
Merge pull request #3 from LordOverlord/dev
LordOverlord Oct 21, 2024
9c42cf3
new tag
LordOverlord Oct 21, 2024
92b7222
mark false prerelease from master
LordOverlord Oct 21, 2024
37b2705
updated security issues dependencies
LordOverlord Oct 21, 2024
5371a17
added snyk
LordOverlord Oct 21, 2024
ec7c5e2
updated containerd
LordOverlord Oct 21, 2024
292d780
changed go version
LordOverlord Oct 21, 2024
b1c5cd3
change to dependency
LordOverlord Oct 21, 2024
bceac61
updated dependency
LordOverlord Oct 21, 2024
794afdd
changes to dependencies
LordOverlord Oct 21, 2024
36c889c
changes to dependencies mod
LordOverlord Oct 21, 2024
60c2f6d
fixed cve on the base image, and changed to builder, for a compact do…
LordOverlord Jul 25, 2025
ce7a3b2
upgraded the go version to 1.21 to support toolchain
LordOverlord Jul 25, 2025
4c19f6a
Fixed some cve on the ctop binary
LordOverlord Jul 25, 2025
1384dc2
Fixed some cve on the ctop binary
LordOverlord Jul 25, 2025
108fce9
cve fix, hopefully
LordOverlord Jul 25, 2025
7116efd
bumped to 23.0.15 fix a few cve, pendind reqrite for the official client
LordOverlord Jul 25, 2025
b6e3a32
Work on the Readme
LordOverlord Jul 25, 2025
57c91c3
Merge pull request #4 from LordOverlord/dev
LordOverlord Jul 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and Deploy Dev

on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags || 'ghcr.io/lordoverlord/ctop:dev' }}
labels: ${{ steps.meta.outputs.labels }}

- name: Run Snyk to check Docker image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ steps.meta.outputs.tags }}
command: monitor
53 changes: 53 additions & 0 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and Deploy Master

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set Docker image tags
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=ref,event=branch

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Run Snyk to check Docker image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ghcr.io/lordoverlord/ctop:latest
command: monitor
102 changes: 102 additions & 0 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Build and Release ctop for dev

on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]

jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/') # prevent loops on tag push

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Tidy up Go modules and get dependencies
run: go mod tidy

- name: Build binaries for major platforms
run: |
GOOS=linux GOARCH=amd64 go build -o ctop-linux-amd64
GOOS=darwin GOARCH=amd64 go build -o ctop-darwin-amd64
GOOS=windows GOARCH=amd64 go build -o ctop-windows-amd64.exe

- name: Get latest version tag
id: get_latest_tag
run: |
git fetch --tags
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "")
echo "latest_tag=$LATEST_TAG" >> "$GITHUB_OUTPUT"

- name: Increment version tag
id: increment_tag
run: |
LATEST_TAG="${{ steps.get_latest_tag.outputs.latest_tag }}"
if [[ "$LATEST_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
MAJOR=${BASH_REMATCH[1]}
MINOR=${BASH_REMATCH[2]}
PATCH=${BASH_REMATCH[3]}
PATCH=$((PATCH + 1))
NEW_TAG="v$MAJOR.$MINOR.$PATCH"
else
echo "No valid version tag found. Starting at v0.1.0"
NEW_TAG="v0.1.0"
fi
echo "new_tag=$NEW_TAG" >> "$GITHUB_OUTPUT"

- name: Create and push new tag
run: |
NEW_TAG=${{ steps.increment_tag.outputs.new_tag }}
git config user.name "github-actions"
git config user.email "[email protected]"
git tag $NEW_TAG
git push origin $NEW_TAG

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.increment_tag.outputs.new_tag }}
release_name: "Binary Release ${{ steps.increment_tag.outputs.new_tag }}"
draft: false
prerelease: true

- name: Upload Linux binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ctop-linux-amd64
asset_name: ctop-linux-amd64
asset_content_type: application/octet-stream

- name: Upload macOS binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ctop-darwin-amd64
asset_name: ctop-darwin-amd64
asset_content_type: application/octet-stream

- name: Upload Windows binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ctop-windows-amd64.exe
asset_name: ctop-windows-amd64.exe
asset_content_type: application/octet-stream
108 changes: 108 additions & 0 deletions .github/workflows/release-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Build and Release ctop for master

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/')

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22

- name: Tidy up Go modules and get dependencies
run: go mod tidy

- name: Install Snyk CLI
uses: snyk/actions/setup@master

- name: Run Snyk to check Go project
run: snyk test
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

- name: Build binaries for major platforms
run: |
GOOS=linux GOARCH=amd64 go build -o ctop-linux-amd64
GOOS=darwin GOARCH=amd64 go build -o ctop-darwin-amd64
GOOS=windows GOARCH=amd64 go build -o ctop-windows-amd64.exe

- name: Get latest version tag
id: get_latest_tag
run: |
git fetch --tags
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "")
echo "latest_tag=$LATEST_TAG" >> "$GITHUB_OUTPUT"

- name: Increment version tag
id: increment_tag
run: |
LATEST_TAG="${{ steps.get_latest_tag.outputs.latest_tag }}"
if [[ "$LATEST_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
MAJOR=${BASH_REMATCH[1]}
MINOR=${BASH_REMATCH[2]}
PATCH=${BASH_REMATCH[3]}
PATCH=$((PATCH + 1))
NEW_TAG="v$MAJOR.$MINOR.$PATCH"
else
echo "No valid version tag found. Starting at v0.1.0"
NEW_TAG="v0.1.0"
fi
echo "new_tag=$NEW_TAG" >> "$GITHUB_OUTPUT"

- name: Create and push new tag
run: |
NEW_TAG=${{ steps.increment_tag.outputs.new_tag }}
git config user.name "github-actions"
git config user.email "[email protected]"
git tag $NEW_TAG
git push origin $NEW_TAG

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.increment_tag.outputs.new_tag }}
release_name: Release ${{ steps.increment_tag.outputs.new_tag }}
draft: false
prerelease: false

- name: Upload Linux binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ctop-linux-amd64
asset_name: ctop-linux-amd64
asset_content_type: application/octet-stream

- name: Upload macOS binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ctop-darwin-amd64
asset_name: ctop-darwin-amd64
asset_content_type: application/octet-stream

- name: Upload Windows binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ctop-windows-amd64.exe
asset_name: ctop-windows-amd64.exe
asset_content_type: application/octet-stream
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM quay.io/vektorcloud/go:1.18

RUN apk add --no-cache make
FROM cgr.dev/chainguard/go:latest AS builder

WORKDIR /app
COPY go.mod .
Expand Down
Loading