Compare commits

...

3 Commits

Author SHA1 Message Date
Henry Dollman
bb295ca297 0.0.1-alpha.2 2024-07-21 19:20:42 -04:00
Henry Dollman
765a4c707b update the update scripts 2024-07-21 19:20:20 -04:00
Henry Dollman
683032f919 add action for docker images 2024-07-21 19:19:58 -04:00
6 changed files with 79 additions and 9 deletions

72
.github/workflows/docker-images.yml vendored Normal file
View File

@@ -0,0 +1,72 @@
name: Make docker images
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image: henrygd/beszel
context: hub
- image: henrygd/beszel-agent
context: agent
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --cwd ./hub/site
- name: Build site
run: bun run --cwd ./hub/site build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker metadata
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }}
# https://github.com/docker/login-action
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: '{{defaultContext}}:${{ matrix.context }}'
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-from: type=gha
cache-to: type=gha

View File

@@ -23,7 +23,7 @@ import (
psutilNet "github.com/shirou/gopsutil/v4/net"
)
var Version = "0.0.1-alpha.0"
var Version = "0.0.1-alpha.2"
var containerCpuMap = make(map[string][2]uint64)
var containerCpuMutex = &sync.Mutex{}

View File

@@ -2,7 +2,6 @@ package main
import (
"fmt"
"log"
"os"
"strings"
@@ -37,7 +36,7 @@ func updateBeszel() {
}
var binaryPath string
fmt.Printf("Updating from %s to %s...", currentVersion, latest.Version)
fmt.Printf("Updating from %s to %s...\n", currentVersion, latest.Version)
binaryPath, err = os.Executable()
if err != nil {
fmt.Println("Error getting binary path:", err)
@@ -48,5 +47,5 @@ func updateBeszel() {
fmt.Println("Please try rerunning with sudo. Error:", err)
os.Exit(1)
}
log.Printf("Successfully updated: %s -> %s\n\n%s", currentVersion, latest.Version, strings.TrimSpace(latest.ReleaseNotes))
fmt.Printf("Successfully updated to %s\n\n%s\n", latest.Version, strings.TrimSpace(latest.ReleaseNotes))
}

View File

@@ -31,7 +31,7 @@ import (
"golang.org/x/crypto/ssh"
)
var Version = "0.0.1-alpha.0"
var Version = "0.0.1-alpha.2"
var app *pocketbase.PocketBase
var serverConnections = make(map[string]Server)

View File

@@ -281,7 +281,7 @@ export function UserAuthForm({
<Dialog>
<DialogTrigger asChild>
<button type="button" className={cn(buttonVariants({ variant: 'outline' }))}>
<img className="mr-2 h-4 w-4 dark:invert" src="/icons/github.svg" alt="" />
<img className="mr-2 h-4 w-4 dark:invert" src="/static/github.svg" alt="" />
<span className="translate-y-[1px]">GitHub</span>
</button>
</DialogTrigger>

View File

@@ -2,7 +2,6 @@ package main
import (
"fmt"
"log"
"os"
"strings"
@@ -38,7 +37,7 @@ func updateBeszel(cmd *cobra.Command, args []string) {
}
var binaryPath string
fmt.Printf("Updating from %s to %s...", currentVersion, latest.Version)
fmt.Printf("Updating from %s to %s...\n", currentVersion, latest.Version)
binaryPath, err = os.Executable()
if err != nil {
fmt.Println("Error getting binary path:", err)
@@ -49,5 +48,5 @@ func updateBeszel(cmd *cobra.Command, args []string) {
fmt.Println("Please try rerunning with sudo. Error:", err)
os.Exit(1)
}
log.Printf("Successfully updated: %s -> %s\n\n%s", currentVersion, latest.Version, strings.TrimSpace(latest.ReleaseNotes))
fmt.Printf("Successfully updated to %s\n\n%s\n", latest.Version, strings.TrimSpace(latest.ReleaseNotes))
}