mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-27 07:31:43 +01:00
Compare commits
3 Commits
mk/kill-32
...
v0.22.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
473027c1ae | ||
|
|
3a77440996 | ||
|
|
731765c36c |
11
.github/workflows/docker-publish-hardened.yaml
vendored
11
.github/workflows/docker-publish-hardened.yaml
vendored
@@ -33,7 +33,7 @@ env:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.runner }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
@@ -43,11 +43,10 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/amd64
|
||||
runner: ubuntu-latest
|
||||
- platform: linux/arm64
|
||||
runner: ubuntu-24.04-arm
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/arm/v7
|
||||
|
||||
steps:
|
||||
- name: Enable Debug Logs
|
||||
|
||||
11
.github/workflows/docker-publish-rootless.yaml
vendored
11
.github/workflows/docker-publish-rootless.yaml
vendored
@@ -37,7 +37,7 @@ env:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.runner }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
@@ -47,11 +47,10 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/amd64
|
||||
runner: ubuntu-latest
|
||||
- platform: linux/arm64
|
||||
runner: ubuntu-24.04-arm
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/arm/v7
|
||||
|
||||
steps:
|
||||
- name: Enable Debug Logs
|
||||
|
||||
11
.github/workflows/docker-publish.yaml
vendored
11
.github/workflows/docker-publish.yaml
vendored
@@ -37,7 +37,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.runner }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read # Allows access to repository contents (read-only)
|
||||
packages: write # Allows pushing to GHCR
|
||||
@@ -47,11 +47,10 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/amd64
|
||||
runner: ubuntu-latest
|
||||
- platform: linux/arm64
|
||||
runner: ubuntu-24.04-arm
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/arm/v7
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
@@ -17,6 +17,8 @@ builds:
|
||||
- freebsd
|
||||
goarch:
|
||||
- amd64
|
||||
- "386"
|
||||
- arm
|
||||
- arm64
|
||||
- riscv64
|
||||
flags:
|
||||
@@ -26,9 +28,20 @@ builds:
|
||||
- -X main.version={{.Version}}
|
||||
- -X main.commit={{.Commit}}
|
||||
- -X main.date={{.Date}}
|
||||
ignore:
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
- goos: windows
|
||||
goarch: "386"
|
||||
- goos: freebsd
|
||||
goarch: arm
|
||||
- goos: freebsd
|
||||
goarch: "386"
|
||||
tags:
|
||||
- >-
|
||||
{{- if eq .Arch "riscv64" }}nodynamic
|
||||
{{- else if eq .Arch "arm" }}nodynamic
|
||||
{{- else if eq .Arch "386" }}nodynamic
|
||||
{{- else if eq .Os "freebsd" }}nodynamic
|
||||
{{ end }}
|
||||
|
||||
@@ -49,6 +62,7 @@ archives:
|
||||
{{ .ProjectName }}_
|
||||
{{- title .Os }}_
|
||||
{{- if eq .Arch "amd64" }}x86_64
|
||||
{{- else if eq .Arch "386" }}i386
|
||||
{{- else }}{{ .Arch }}{{ end }}
|
||||
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
||||
# use zip for windows archives
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
-- +goose no transaction
|
||||
PRAGMA foreign_keys=OFF;
|
||||
-- SQLite doesn't support ALTER COLUMN directly, so we need to recreate the table
|
||||
-- Create a temporary table with the new schema
|
||||
CREATE TABLE users_temp (
|
||||
@@ -21,7 +22,7 @@ CREATE TABLE users_temp (
|
||||
);
|
||||
|
||||
-- Copy data from the original table
|
||||
INSERT INTO users_temp SELECT * FROM users;
|
||||
INSERT INTO users_temp SELECT id, created_at, updated_at, name, email, password, is_superuser, superuser, role, activated_on, group_users FROM users;
|
||||
|
||||
-- Drop the original table
|
||||
DROP TABLE users;
|
||||
@@ -31,38 +32,4 @@ ALTER TABLE users_temp RENAME TO users;
|
||||
|
||||
-- Recreate the unique index
|
||||
CREATE UNIQUE INDEX users_email_key on users (email);
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
-- Create the original table structure
|
||||
CREATE TABLE users_temp (
|
||||
id uuid not null
|
||||
primary key,
|
||||
created_at datetime not null,
|
||||
updated_at datetime not null,
|
||||
name text not null,
|
||||
email text not null,
|
||||
password text not null,
|
||||
is_superuser bool default false not null,
|
||||
superuser bool default false not null,
|
||||
role text default 'user' not null,
|
||||
activated_on datetime,
|
||||
group_users uuid not null
|
||||
constraint users_groups_users
|
||||
references groups
|
||||
on delete cascade
|
||||
);
|
||||
|
||||
-- Copy data from the current table (this will fail if there are NULL passwords)
|
||||
INSERT INTO users_temp SELECT * FROM users;
|
||||
|
||||
-- Drop the current table
|
||||
DROP TABLE users;
|
||||
|
||||
-- Rename the temporary table
|
||||
ALTER TABLE users_temp RENAME TO users;
|
||||
|
||||
-- Recreate the unique index
|
||||
CREATE UNIQUE INDEX users_email_key on users (email);
|
||||
-- +goose StatementEnd
|
||||
PRAGMA foreign_keys=ON;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
-- +goose Up
|
||||
-- Force the role and superuser flags, previous nullable password migration (prior to v0.22.2)
|
||||
-- caused them to flip-flop during migration for some users.
|
||||
UPDATE users SET role = 'owner', is_superuser = 0, superuser = 0;
|
||||
Reference in New Issue
Block a user