From d2ff1bcc80ce7babee18149ce74d936d634c5d15 Mon Sep 17 00:00:00 2001 From: ronnyfriedland Date: Wed, 19 Mar 2025 20:51:09 +0100 Subject: [PATCH 01/55] Add excel export --- Readme.md | 3 ++ cmd/main.go | 11 ++++--- cmd/main_test.go | 17 +++++++--- go.mod | 15 ++++++++- go.sum | 24 ++++++++++++++ internal/cli/cli.go | 8 ++++- internal/cli/cli_test.go | 6 ++-- internal/excel/excel.go | 61 ++++++++++++++++++++++++++++++++++++ internal/excel/excel_test.go | 47 +++++++++++++++++++++++++++ 9 files changed, 179 insertions(+), 13 deletions(-) create mode 100644 internal/excel/excel.go create mode 100644 internal/excel/excel_test.go diff --git a/Readme.md b/Readme.md index 25859e7..db1fd65 100644 --- a/Readme.md +++ b/Readme.md @@ -11,12 +11,15 @@ The timetracker application provides the following arguments which can be passed | Property | Description | |---------------|----------------------------------------------------------------------------| +| archivedata | Enables archiving timetracker status to excel archive file, default: false | | configpath | Defines the location of the necessary files, default: /var/lib/timetracker | ## Execution The application is triggered by a systemd timer which triggers the application via systemd unit. +*Note:* Running timetracker with ystemd unit uses the default property values. To change it you have to modify the unit file. + To enable the timer you have to (requires root privileges): ### enable the timer diff --git a/cmd/main.go b/cmd/main.go index 9bb302a..41097f1 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -7,27 +7,28 @@ import ( ) func main() { - mode, configPath := parseArguments() + mode, configPath, archiveData := parseArguments() if mode == "" { os.Exit(0) } else if mode == "cli" { - cli.Run(&configPath) + cli.Run(&configPath, &archiveData) os.Exit(0) } else { os.Exit(1) } } -func parseArguments() (string, string) { +func parseArguments() (string, string, bool) { mode := flag.String("mode", "cli", "the application mode, available: cli") configPath := flag.String("configpath", "/var/lib/timetracker", "the config path") + archiveData := flag.Bool("archivedata", false, "flag to enable data archiving") help := flag.Bool("help", false, "print this help message") flag.Parse() if *help { flag.PrintDefaults() - return "", "" + return "", "", false } else { - return *mode, *configPath + return *mode, *configPath, *archiveData } } diff --git a/cmd/main_test.go b/cmd/main_test.go index b909b74..3af1815 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -11,18 +11,21 @@ func TestParameter(t *testing.T) { oldArgs := os.Args defer func() { os.Args = oldArgs }() - params := []string{"-configpath", "/foo", "-mode", "testmode"} + params := []string{"-mode", "testmode", "-configpath", "/foo", "-archivedata", "true"} flag.CommandLine = flag.NewFlagSet("test", flag.ContinueOnError) os.Args = append([]string{"params"}, params...) - mode, configPath := parseArguments() + mode, configPath, archiveData := parseArguments() if mode != "testmode" { log.Fatalf("Got unexpected mode result, got %s, expected %s", "testmode", mode) } if configPath != "/foo" { log.Fatalf("Got unexpected config path result, got %s, expected %s", "/foo", configPath) } + if !archiveData { + log.Fatalf("Got unexpected archive data flag result, got %t, expected %t", true, archiveData) + } } func TestParameterDefaults(t *testing.T) { @@ -34,13 +37,16 @@ func TestParameterDefaults(t *testing.T) { flag.CommandLine = flag.NewFlagSet("test", flag.ContinueOnError) os.Args = append([]string{"defaults"}, params...) - mode, configPath := parseArguments() + mode, configPath, archiveData := parseArguments() if mode != "cli" { log.Fatalf("Got unexpected mode result, got %s, expected %s", "cli", mode) } if configPath != "/var/lib/timetracker" { log.Fatalf("Got unexpected config path result, got %s, expected %s", "/var/lib/timetracker", configPath) } + if archiveData { + log.Fatalf("Got unexpected archive data flag result, got %t, expected %t", false, archiveData) + } } func TestParameterHelp(t *testing.T) { @@ -52,11 +58,14 @@ func TestParameterHelp(t *testing.T) { flag.CommandLine = flag.NewFlagSet("test", flag.ContinueOnError) os.Args = append([]string{"help"}, params...) - mode, configPath := parseArguments() + mode, configPath, archiveData := parseArguments() if mode != "" { log.Fatalf("Got unexpected mode result, got %s, expected %s", "", mode) } if configPath != "" { log.Fatalf("Got unexpected config path result, got %s, expected %s", "", configPath) } + if archiveData { + log.Fatalf("Got unexpected archive data flag result, got %t, expected %t", false, archiveData) + } } diff --git a/go.mod b/go.mod index 11b91b5..4fb5f89 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,16 @@ module ronnyfriedland/timetracker/v2 -go 1.18 +go 1.19 + +require github.com/xuri/excelize/v2 v2.9.0 + +require ( + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/richardlehane/mscfb v1.0.4 // indirect + github.com/richardlehane/msoleps v1.0.4 // indirect + github.com/xuri/efp v0.0.0-20250227110027-3491fafc2b79 // indirect + github.com/xuri/nfp v0.0.0-20250226145837-86d5fc24b2ba // indirect + golang.org/x/crypto v0.36.0 // indirect + golang.org/x/net v0.37.0 // indirect + golang.org/x/text v0.23.0 // indirect +) diff --git a/go.sum b/go.sum index e69de29..e6e8908 100644 --- a/go.sum +++ b/go.sum @@ -0,0 +1,24 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM= +github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= +github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= +github.com/richardlehane/msoleps v1.0.4 h1:WuESlvhX3gH2IHcd8UqyCuFY5yiq/GR/yqaSM/9/g00= +github.com/richardlehane/msoleps v1.0.4/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/xuri/efp v0.0.0-20250227110027-3491fafc2b79 h1:78nKszZqigiBRBVcoe/AuPzyLTWW5B+ltBaUX1rlIXA= +github.com/xuri/efp v0.0.0-20250227110027-3491fafc2b79/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= +github.com/xuri/excelize/v2 v2.9.0 h1:1tgOaEq92IOEumR1/JfYS/eR0KHOCsRv/rYXXh6YJQE= +github.com/xuri/excelize/v2 v2.9.0/go.mod h1:uqey4QBZ9gdMeWApPLdhm9x+9o2lq4iVmjiLfBS5hdE= +github.com/xuri/nfp v0.0.0-20250226145837-86d5fc24b2ba h1:DhIu6n3qU0joqG9f4IO6a/Gkerd+flXrmlJ+0yX2W8U= +github.com/xuri/nfp v0.0.0-20250226145837-86d5fc24b2ba/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ= +golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= +golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 0229763..b33ea19 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -2,14 +2,17 @@ package cli import ( "log" + + "ronnyfriedland/timetracker/v2/internal/excel" "ronnyfriedland/timetracker/v2/internal/logic" ) const dateLayout = "02.01.2006" const timeLayout = "15:04:05" -func Run(configPath *string) { +func Run(configPath *string, archiveData *bool) { duration := logic.Execute(configPath) + if duration.Complete { log.Printf("[%s] - Work duration: %2.2fh", duration.Date.Format(dateLayout), @@ -20,5 +23,8 @@ func Run(configPath *string) { duration.StartTime.Format(timeLayout), duration.EndTime.Format(timeLayout)) + if *archiveData { + excel.Export(configPath, duration) + } } } diff --git a/internal/cli/cli_test.go b/internal/cli/cli_test.go index 9067166..fe27786 100644 --- a/internal/cli/cli_test.go +++ b/internal/cli/cli_test.go @@ -16,8 +16,9 @@ func TestRunNotComplete(t *testing.T) { log.SetOutput(&logContent) directory, _ := createStatusFile() + archiveData := false - Run(&directory) + Run(&directory, &archiveData) if logContent.String() != "" { log.Fatalf("Expected empty logmessage") @@ -31,10 +32,11 @@ func TestRunComplete(t *testing.T) { log.SetOutput(&logContent) directory, fileName := createStatusFile() + archiveData := false setModificationDate(fileName, "28.02.2022") - Run(&directory) + Run(&directory, &archiveData) if logContent.String() == "" { log.Fatalf("Expected logmessage") diff --git a/internal/excel/excel.go b/internal/excel/excel.go new file mode 100644 index 0000000..7df466c --- /dev/null +++ b/internal/excel/excel.go @@ -0,0 +1,61 @@ +package excel + +import ( + "fmt" + "log" + "time" + + "github.com/xuri/excelize/v2" + + "ronnyfriedland/timetracker/v2/internal/logic" +) + +var SheetName = time.Now().Format("2006") +var Headers = []string{"Date", "From", "To", "Duration"} + +const dateLayout = "02.01.2006" +const timeLayout = "15:04:05" + +func Export(configPath *string, duration logic.Duration) string { + archiveDataFile := *configPath + "/timetracker.xlsx" + + file, err := excelize.OpenFile(archiveDataFile) + if err != nil { + file = excelize.NewFile() + } + defer func() { + err := file.Close() + if err != nil { + log.Fatal(err) + } + }() + + _, err = file.NewSheet(SheetName) + if err != nil { + log.Fatalf("Failed to ensure sheet created: %v", err) + } + file.DeleteSheet("Sheet1") + + for i, header := range Headers { + file.SetCellValue(SheetName, fmt.Sprintf("%s%d", string(rune(65+i)), 1), header) + } + + rows, err := file.GetRows(SheetName) + if err != nil { + log.Fatalf("Failed to get rows from sheet: %v", err) + } + + next := len(rows) + 1 + + file.SetCellValue(SheetName, fmt.Sprintf("A%d", next), duration.Date.Format(dateLayout)) + file.SetCellValue(SheetName, fmt.Sprintf("B%d", next), duration.StartTime.Format(timeLayout)) + file.SetCellValue(SheetName, fmt.Sprintf("C%d", next), duration.EndTime.Format(timeLayout)) + file.SetCellValue(SheetName, fmt.Sprintf("D%d", next), fmt.Sprintf("%2.2f", duration.Duration.Hours())) + + if err := file.SaveAs(archiveDataFile); + err != nil { + log.Fatal(err) + } + + return archiveDataFile +} diff --git a/internal/excel/excel_test.go b/internal/excel/excel_test.go new file mode 100644 index 0000000..8eef735 --- /dev/null +++ b/internal/excel/excel_test.go @@ -0,0 +1,47 @@ +package excel + +import ( + "log" + "os" + "ronnyfriedland/timetracker/v2/internal/logic" + "testing" + "time" + + "github.com/xuri/excelize/v2" +) + +func TestExport(t *testing.T) { + + testData := logic.Duration{ + Date: time.Now(), + StartTime: time.Now(), + EndTime: time.Now(), + Duration: time.Duration(1000), + } + + excelDirectory := os.TempDir() + excelFile := Export(&excelDirectory, testData) + + file, err := excelize.OpenFile(excelFile) + if err != nil { + log.Fatalf("Expected excel file") + } + + rows, err := file.GetRows(SheetName) + if err != nil { + log.Fatalf("Expected no error getting rows") + } + + if len(rows) != 2 { + log.Fatalf("Unexpected line count - expected 2, got %d", len(rows)) + } + + headers := rows[0] + for i := 0; i < len(headers); i++ { + if headers[i] != Headers[i] { + log.Fatalf("Unexpected header value - expected %s, got %s", Headers[i], headers[i]) + } + } + + defer os.Remove(excelFile) +} From 27711692bfa48978753abc8b05cea4d1e336f111 Mon Sep 17 00:00:00 2001 From: ronnyfriedland Date: Thu, 20 Mar 2025 19:58:00 +0100 Subject: [PATCH 02/55] raise go version to 1.19 --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index eab49d2..25b15e2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.18' + go-version: '1.19' - name: Build run: go build -v ./... From 80c4c07682289be8c1732faf6334de6801651b15 Mon Sep 17 00:00:00 2001 From: ronnyfriedland Date: Thu, 20 Mar 2025 20:02:08 +0100 Subject: [PATCH 03/55] switch to debian --- .github/workflows/anchore-syft.yml | 2 +- .github/workflows/debian.yml | 2 +- .github/workflows/go.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/anchore-syft.yml b/.github/workflows/anchore-syft.yml index 9fb52ac..704982e 100644 --- a/.github/workflows/anchore-syft.yml +++ b/.github/workflows/anchore-syft.yml @@ -24,7 +24,7 @@ jobs: Anchore-Build-Scan: permissions: contents: write # required to upload to the Dependency submission API - runs-on: ubuntu-latest + runs-on: debian-latest steps: - name: Checkout the code uses: actions/checkout@v3 diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index 704f950..33d1f9e 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -11,7 +11,7 @@ on: jobs: Create_Packages: name: Create Package - runs-on: ubuntu-latest + runs-on: debian-latest steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 25b15e2..37a8350 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: debian-latest steps: - uses: actions/checkout@v3 From edc5fb964134c1a1297528d73c6ec6baae8549de Mon Sep 17 00:00:00 2001 From: ronnyfriedland Date: Thu, 20 Mar 2025 20:05:22 +0100 Subject: [PATCH 04/55] Revert "switch to debian" This reverts commit 80c4c07682289be8c1732faf6334de6801651b15. --- .github/workflows/anchore-syft.yml | 2 +- .github/workflows/debian.yml | 2 +- .github/workflows/go.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/anchore-syft.yml b/.github/workflows/anchore-syft.yml index 704982e..9fb52ac 100644 --- a/.github/workflows/anchore-syft.yml +++ b/.github/workflows/anchore-syft.yml @@ -24,7 +24,7 @@ jobs: Anchore-Build-Scan: permissions: contents: write # required to upload to the Dependency submission API - runs-on: debian-latest + runs-on: ubuntu-latest steps: - name: Checkout the code uses: actions/checkout@v3 diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index 33d1f9e..704f950 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -11,7 +11,7 @@ on: jobs: Create_Packages: name: Create Package - runs-on: debian-latest + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 37a8350..25b15e2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: debian-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 239fe92bff0f2d331444b550e831168b87c9904e Mon Sep 17 00:00:00 2001 From: ronnyfriedland Date: Thu, 20 Mar 2025 20:07:06 +0100 Subject: [PATCH 05/55] Use go 1.18 again --- .github/workflows/go.yml | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 25b15e2..eab49d2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.18' - name: Build run: go build -v ./... diff --git a/go.mod b/go.mod index 4fb5f89..f179543 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module ronnyfriedland/timetracker/v2 -go 1.19 +go 1.18 require github.com/xuri/excelize/v2 v2.9.0 From 760d906be93137aa3f40a8f2bd18282f1ece7d39 Mon Sep 17 00:00:00 2001 From: ronnyfriedland Date: Thu, 20 Mar 2025 20:20:17 +0100 Subject: [PATCH 06/55] change version --- .github/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index 704f950..61203e2 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build run: go build -o timetracker cmd/main.go From 432e5ab9f2004b79d29c90035ab8feb488b1c0c2 Mon Sep 17 00:00:00 2001 From: ronnyfriedland Date: Thu, 20 Mar 2025 20:21:56 +0100 Subject: [PATCH 07/55] go mod tidy --- .github/workflows/debian.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index 61203e2..d01d462 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -15,6 +15,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + + - name: Tidy dependencies + run: go mod tidy - name: Build run: go build -o timetracker cmd/main.go From 907a7505a87171a3eaeec6094300fd6c5957e3fa Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 4 Jun 2025 11:54:36 +0200 Subject: [PATCH 08/55] Provide update-alternatives to shwitch to archive mode --- .github/workflows/debian.yml | 3 ++- DEBIAN/postinst | 5 +++++ DEBIAN/prerm | 2 ++ Readme.md | 8 +++++++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index d01d462..5423edb 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -28,7 +28,8 @@ jobs: mkdir -p PKG_SOURCE/var/lib/timetracker mkdir -p PKG_SOURCE/lib/systemd/system cp -Rf ./DEBIAN PKG_SOURCE/ - cp -Rf ./timetracker PKG_SOURCE/usr/local/bin/ + cp -Rf ./timetracker PKG_SOURCE/var/lib/timetracker/ + cp -Rf ./scripts/* PKG_SOURCE/var/lib/timetracker/ cp -Rf ./systemd/* PKG_SOURCE/lib/systemd/system/ - name: Create Deb package diff --git a/DEBIAN/postinst b/DEBIAN/postinst index 3798664..4f83dd5 100755 --- a/DEBIAN/postinst +++ b/DEBIAN/postinst @@ -5,6 +5,11 @@ set -e case "$1" in configure) chown -R timetracker:timetracker /var/lib/timetracker + + chmod u+x /var/lib/timetracker/timetracker*.sh + + update-alternatives --install /usr/local/bin/timetracker timetracker /var/lib/timetracker/timetracker-archive.sh 100 + update-alternatives --install /usr/local/bin/timetracker timetracker /var/lib/timetracker/timetracker.sh 1000 ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/DEBIAN/prerm b/DEBIAN/prerm index f536fcb..09c5cad 100755 --- a/DEBIAN/prerm +++ b/DEBIAN/prerm @@ -10,6 +10,8 @@ case "$1" in if getent group timetracker >/dev/null; then delgroup --system timetracker fi + + update-alternatives --remove-all timetracker ;; upgrade) diff --git a/Readme.md b/Readme.md index db1fd65..5fc9900 100644 --- a/Readme.md +++ b/Readme.md @@ -18,7 +18,13 @@ The timetracker application provides the following arguments which can be passed The application is triggered by a systemd timer which triggers the application via systemd unit. -*Note:* Running timetracker with ystemd unit uses the default property values. To change it you have to modify the unit file. +*Note:* Running timetracker with systemd unit uses the default property values. To change it you have use the appropriate alternative. + +### Switch alternative + +```shell +update-alternatives --config timetracker +``` To enable the timer you have to (requires root privileges): From 168cfafa938c51662a5b77e49f4d247102d61080 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 4 Jun 2025 13:19:17 +0200 Subject: [PATCH 09/55] Add missing scripts directory --- scripts/timetracker-archive.sh | 3 +++ scripts/timetracker.sh | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 scripts/timetracker-archive.sh create mode 100644 scripts/timetracker.sh diff --git a/scripts/timetracker-archive.sh b/scripts/timetracker-archive.sh new file mode 100644 index 0000000..f343215 --- /dev/null +++ b/scripts/timetracker-archive.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +timetracker -archivedata=true \ No newline at end of file diff --git a/scripts/timetracker.sh b/scripts/timetracker.sh new file mode 100644 index 0000000..ab51640 --- /dev/null +++ b/scripts/timetracker.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +timetracker \ No newline at end of file From 9347134276b7fc4109c7dddc19ee1c354f2d44a8 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Thu, 5 Jun 2025 08:24:05 +0200 Subject: [PATCH 10/55] Fix scripts - use full path to binary to prevent loops --- DEBIAN/control | 2 +- scripts/timetracker-archive.sh | 2 +- scripts/timetracker.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DEBIAN/control b/DEBIAN/control index 37be5dd..dfbc182 100644 --- a/DEBIAN/control +++ b/DEBIAN/control @@ -1,5 +1,5 @@ Package: timetracker -Version: 1.0.2 +Version: 1.2.0 Section: misc Priority: optional Architecture: all diff --git a/scripts/timetracker-archive.sh b/scripts/timetracker-archive.sh index f343215..0fd9b50 100644 --- a/scripts/timetracker-archive.sh +++ b/scripts/timetracker-archive.sh @@ -1,3 +1,3 @@ #!/usr/bin/env sh -timetracker -archivedata=true \ No newline at end of file +/var/lib/timetracker/timetracker -archivedata=true \ No newline at end of file diff --git a/scripts/timetracker.sh b/scripts/timetracker.sh index ab51640..b8e26f9 100644 --- a/scripts/timetracker.sh +++ b/scripts/timetracker.sh @@ -1,3 +1,3 @@ #!/usr/bin/env sh -timetracker \ No newline at end of file +/var/lib/timetracker/timetracker \ No newline at end of file From 24621d48fddf39e5b9b15e526ae67e6d75942ab7 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Thu, 24 Jul 2025 12:58:56 +0200 Subject: [PATCH 11/55] move github actions to forgejo --- {.github => .forgejo}/workflows/anchore-syft.yml | 0 {.github => .forgejo}/workflows/codeql.yml | 0 {.github => .forgejo}/workflows/debian.yml | 0 {.github => .forgejo}/workflows/go.yml | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {.github => .forgejo}/workflows/anchore-syft.yml (100%) rename {.github => .forgejo}/workflows/codeql.yml (100%) rename {.github => .forgejo}/workflows/debian.yml (100%) rename {.github => .forgejo}/workflows/go.yml (100%) diff --git a/.github/workflows/anchore-syft.yml b/.forgejo/workflows/anchore-syft.yml similarity index 100% rename from .github/workflows/anchore-syft.yml rename to .forgejo/workflows/anchore-syft.yml diff --git a/.github/workflows/codeql.yml b/.forgejo/workflows/codeql.yml similarity index 100% rename from .github/workflows/codeql.yml rename to .forgejo/workflows/codeql.yml diff --git a/.github/workflows/debian.yml b/.forgejo/workflows/debian.yml similarity index 100% rename from .github/workflows/debian.yml rename to .forgejo/workflows/debian.yml diff --git a/.github/workflows/go.yml b/.forgejo/workflows/go.yml similarity index 100% rename from .github/workflows/go.yml rename to .forgejo/workflows/go.yml From a216a792ff73f94382b77130c414a58086b5ac3a Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Tue, 5 Aug 2025 08:55:00 +0200 Subject: [PATCH 12/55] switch to v3 --- .forgejo/workflows/debian.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 5423edb..7a674ff 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Tidy dependencies run: go mod tidy @@ -39,4 +39,4 @@ jobs: - name: Release the Deb package uses: softprops/action-gh-release@v1 with: - files: timetracker_${{github.ref_name}}.deb \ No newline at end of file + files: timetracker_${{github.ref_name}}.deb From 8faa251b5e64765fb26c496cb12578cc6151ea4d Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Tue, 5 Aug 2025 11:41:25 +0200 Subject: [PATCH 13/55] use softprops --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 7a674ff..2b04b13 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -37,6 +37,6 @@ jobs: dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - name: Release the Deb package - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@59c3b4891632ff9a897f99a91d7bc557467a3a22 with: files: timetracker_${{github.ref_name}}.deb From 08385977cc824ac7b0fb6d85434c0c768becc86e Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Tue, 5 Aug 2025 13:46:12 +0200 Subject: [PATCH 14/55] switch to v4 --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 2b04b13..7509204 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Tidy dependencies run: go mod tidy From 4386eef4154394b72adac1a2cf1ba06b309c07f7 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 08:35:16 +0200 Subject: [PATCH 15/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 7509204..abeee26 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -37,6 +37,6 @@ jobs: dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - name: Release the Deb package - uses: softprops/action-gh-release@59c3b4891632ff9a897f99a91d7bc557467a3a22 + uses: softprops/action-gh-release@v2 with: files: timetracker_${{github.ref_name}}.deb From d540272153cd4f88bc02f4c099c5089f0b9966c0 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 08:45:31 +0200 Subject: [PATCH 16/55] test --- .forgejo/workflows/debian.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index abeee26..7a1886b 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -36,7 +36,7 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - name: Release the Deb package - uses: softprops/action-gh-release@v2 - with: - files: timetracker_${{github.ref_name}}.deb + #- name: Release the Deb package + #uses: softprops/action-gh-release@v2 + #with: + #files: timetracker_${{github.ref_name}}.deb From ea03051cdce96d238bb4ec07dae47e0c74f9f7bc Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 08:52:14 +0200 Subject: [PATCH 17/55] test --- .forgejo/workflows/debian.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 7a1886b..0c07c45 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -15,7 +15,12 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - + + - name: Set up Go + uses: https://code.forgejo.org/actions/setup-go@v5 + with: + go-version: '1.18' + - name: Tidy dependencies run: go mod tidy From 390faa088b85ac681451d8bf358e6212c21fbcb8 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 08:55:14 +0200 Subject: [PATCH 18/55] test --- .forgejo/workflows/debian.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 0c07c45..e4c0f25 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,6 +41,11 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb + - name: Upload release asset + uses: https://code.forgejo.org/actions/upload-release-asset@v1 + with: + files: timetracker_${{github.ref_name}}.deb + #- name: Release the Deb package #uses: softprops/action-gh-release@v2 #with: From 9fa12746cad375bd012fc1462fab634cd7abb6c1 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 08:56:23 +0200 Subject: [PATCH 19/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index e4c0f25..6d68634 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,7 +41,7 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - name: Upload release asset + - name: Upload release asset uses: https://code.forgejo.org/actions/upload-release-asset@v1 with: files: timetracker_${{github.ref_name}}.deb From b7b725753fbbc6ef4fd452cd3cf737b65c5a4977 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 09:01:14 +0200 Subject: [PATCH 20/55] test --- .forgejo/workflows/debian.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 6d68634..69a05a8 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -45,6 +45,8 @@ jobs: uses: https://code.forgejo.org/actions/upload-release-asset@v1 with: files: timetracker_${{github.ref_name}}.deb + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} #- name: Release the Deb package #uses: softprops/action-gh-release@v2 From c9d9c0b0e70c0cc92c44e65f3d79a7674b0936b9 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 09:08:54 +0200 Subject: [PATCH 21/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 69a05a8..600897b 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -46,7 +46,7 @@ jobs: with: files: timetracker_${{github.ref_name}}.deb env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.test }} #- name: Release the Deb package #uses: softprops/action-gh-release@v2 From bc5aa1e45cb3b8d0ba32185ac9bf29abc52acc30 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 10:54:59 +0200 Subject: [PATCH 22/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 600897b..b341d02 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -46,7 +46,7 @@ jobs: with: files: timetracker_${{github.ref_name}}.deb env: - GITHUB_TOKEN: ${{ secrets.test }} + FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} #- name: Release the Deb package #uses: softprops/action-gh-release@v2 From 6f7ff56a80e338b91a907eaedf5371116ec017fa Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 11:03:27 +0200 Subject: [PATCH 23/55] test --- .forgejo/workflows/debian.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index b341d02..3a8a3b3 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,14 +41,8 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - name: Upload release asset - uses: https://code.forgejo.org/actions/upload-release-asset@v1 + - name: 'Upload Artifact' + uses: actions/upload-artifact@v4 with: - files: timetracker_${{github.ref_name}}.deb - env: - FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} - - #- name: Release the Deb package - #uses: softprops/action-gh-release@v2 - #with: - #files: timetracker_${{github.ref_name}}.deb + name: timetracker_binary + path: timetracker_${{github.ref_name}}.deb From f3af9cb5a779cc261c3c702ec879693fcd1dac64 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 11:05:56 +0200 Subject: [PATCH 24/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 3a8a3b3..f4cdea9 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -42,7 +42,7 @@ jobs: dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - name: 'Upload Artifact' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: timetracker_binary path: timetracker_${{github.ref_name}}.deb From 2a0316008a88ea34078ad861d0be7b0bdbd1e24c Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Wed, 6 Aug 2025 11:15:29 +0200 Subject: [PATCH 25/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index f4cdea9..d734027 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -42,7 +42,7 @@ jobs: dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - name: 'Upload Artifact' - uses: actions/upload-artifact@v3 + uses: actions/upload-release-asset@v1 with: name: timetracker_binary path: timetracker_${{github.ref_name}}.deb From d0339fee455b3b39e6f57d250109c23c466b708e Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Thu, 7 Aug 2025 09:35:09 +0200 Subject: [PATCH 26/55] test --- .forgejo/workflows/debian.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index d734027..17b1396 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,8 +41,14 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - name: 'Upload Artifact' - uses: actions/upload-release-asset@v1 + - uses: actions/forgejo-release@v2.6.0 with: - name: timetracker_binary - path: timetracker_${{github.ref_name}}.deb + direction: upload + repo: ronnyfriedland/timetracker + token: ${{ secrets.test }} + + # - name: 'Upload Artifact' + # uses: actions/upload-release-asset@v1 + #with: + # name: timetracker_binary + #path: timetracker_${{github.ref_name}}.deb From eb8008273340185a8f8d0230874af12259f25824 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Thu, 7 Aug 2025 09:39:45 +0200 Subject: [PATCH 27/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 17b1396..fca0983 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -45,7 +45,7 @@ jobs: with: direction: upload repo: ronnyfriedland/timetracker - token: ${{ secrets.test }} + token: ${{ test }} # - name: 'Upload Artifact' # uses: actions/upload-release-asset@v1 From ccda5dcc01eb27b7e68d4b6be2abdce4c9eab91b Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Thu, 7 Aug 2025 09:46:08 +0200 Subject: [PATCH 28/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index fca0983..17b1396 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -45,7 +45,7 @@ jobs: with: direction: upload repo: ronnyfriedland/timetracker - token: ${{ test }} + token: ${{ secrets.test }} # - name: 'Upload Artifact' # uses: actions/upload-release-asset@v1 From 692f41c5fb3fa5142b6c09a333a6207e642c405f Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Thu, 7 Aug 2025 10:12:58 +0200 Subject: [PATCH 29/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 17b1396..407fd46 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,7 +41,7 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - uses: actions/forgejo-release@v2.6.0 + - uses: actions/forgejo-release@v2.1.0 with: direction: upload repo: ronnyfriedland/timetracker From 3d817cf7376aef60bd05723321f18bd1cd2e8dc7 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Thu, 7 Aug 2025 14:33:46 +0200 Subject: [PATCH 30/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 407fd46..cc36a98 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,7 +41,7 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - uses: actions/forgejo-release@v2.1.0 + - uses: actions/forgejo-release@v2.7.2 with: direction: upload repo: ronnyfriedland/timetracker From d218f8bbe8712f73b41aecae0722b8c15c22c044 Mon Sep 17 00:00:00 2001 From: Ronny Friedland Date: Thu, 7 Aug 2025 14:40:12 +0200 Subject: [PATCH 31/55] test --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index cc36a98..ebba925 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,7 +41,7 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - uses: actions/forgejo-release@v2.7.2 + - uses: actions/forgejo-release@v2.7.1 with: direction: upload repo: ronnyfriedland/timetracker From 09227bd266a11292223c2ec27a00a101c90c9bc6 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 09:19:58 +0000 Subject: [PATCH 32/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index ebba925..53f0e20 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,12 +41,20 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - uses: actions/forgejo-release@v2.7.1 + - name: Upload Artifact (für CI-Artefakt) + uses: actions/upload-artifact@v4 with: - direction: upload - repo: ronnyfriedland/timetracker + name: my-artifact + path: ./build/path/to/artifact.zip + retention-days: 5 token: ${{ secrets.test }} + #- uses: actions/forgejo-release@v2.7.1 + # with: + # direction: upload + # repo: ronnyfriedland/timetracker + # token: ${{ secrets.test }} + # - name: 'Upload Artifact' # uses: actions/upload-release-asset@v1 #with: From b72c4de2a60621062dfdf598286c7fd6bf896462 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 09:21:52 +0000 Subject: [PATCH 33/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 53f0e20..16bd329 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -45,7 +45,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: my-artifact - path: ./build/path/to/artifact.zip + path: timetracker_*.deb retention-days: 5 token: ${{ secrets.test }} From bc4efc49b899401a9c68f6a94ee9fad225f823ca Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:32:09 +0000 Subject: [PATCH 34/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 16bd329..7899fd1 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -42,9 +42,9 @@ jobs: dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - name: Upload Artifact (für CI-Artefakt) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: - name: my-artifact + name: timetracker.deb path: timetracker_*.deb retention-days: 5 token: ${{ secrets.test }} From 7e65e7012e465b5ea77bb5d4942a14b23dbfebf2 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:37:26 +0000 Subject: [PATCH 35/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 7899fd1..b93f79a 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -44,19 +44,18 @@ jobs: - name: Upload Artifact (für CI-Artefakt) uses: actions/upload-artifact@v3 with: - name: timetracker.deb - path: timetracker_*.deb + name: timetracker_$(git rev-parse --short HEAD).deb + path: timetracker_$(git rev-parse --short HEAD).deb retention-days: 5 token: ${{ secrets.test }} - #- uses: actions/forgejo-release@v2.7.1 - # with: - # direction: upload - # repo: ronnyfriedland/timetracker - # token: ${{ secrets.test }} - - # - name: 'Upload Artifact' - # uses: actions/upload-release-asset@v1 - #with: - # name: timetracker_binary - #path: timetracker_${{github.ref_name}}.deb + - uses: https://data.forgejo.org/actions/checkout@v4 + - name: Upload Package + run: | + FILE="timetracker.deb" + ORG="Ronny.Friedland" + REPO="timetracker" + VERSION=$(git rev-parse --short HEAD) + curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} \ + --upload-file $FILE \ + "https://${{ env.FORGEJO_BASE_URL }}/api/packages/${ORG}/generic/${REPO}/${VERSION}/${FILE}" From a32b8b2a5cc35a6a8bd5b3add01563bed534fed4 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:39:33 +0000 Subject: [PATCH 36/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index b93f79a..c096291 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -52,7 +52,7 @@ jobs: - uses: https://data.forgejo.org/actions/checkout@v4 - name: Upload Package run: | - FILE="timetracker.deb" + FILE="timetracker_$(git rev-parse --short HEAD).deb" ORG="Ronny.Friedland" REPO="timetracker" VERSION=$(git rev-parse --short HEAD) From 47af533d9f0982c4fba5d22712262435792cd091 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:40:57 +0000 Subject: [PATCH 37/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index c096291..56a223e 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -44,15 +44,15 @@ jobs: - name: Upload Artifact (für CI-Artefakt) uses: actions/upload-artifact@v3 with: - name: timetracker_$(git rev-parse --short HEAD).deb - path: timetracker_$(git rev-parse --short HEAD).deb + name: timetracker.deb + path: timetracker.deb retention-days: 5 token: ${{ secrets.test }} - uses: https://data.forgejo.org/actions/checkout@v4 - name: Upload Package run: | - FILE="timetracker_$(git rev-parse --short HEAD).deb" + FILE="timetracker.deb" ORG="Ronny.Friedland" REPO="timetracker" VERSION=$(git rev-parse --short HEAD) From 074de6987828436df12467f1329c83e5011921f2 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:42:08 +0000 Subject: [PATCH 38/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 56a223e..3a7a2a4 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -44,15 +44,15 @@ jobs: - name: Upload Artifact (für CI-Artefakt) uses: actions/upload-artifact@v3 with: - name: timetracker.deb - path: timetracker.deb + name: timetracker_${{github.ref_name}}.deb + path: timetracker_${{github.ref_name}}.deb retention-days: 5 token: ${{ secrets.test }} - uses: https://data.forgejo.org/actions/checkout@v4 - name: Upload Package run: | - FILE="timetracker.deb" + FILE="timetracker_${{github.ref_name}}.deb" ORG="Ronny.Friedland" REPO="timetracker" VERSION=$(git rev-parse --short HEAD) From 4c6aca38f231d1de456549b860e2b60c427c6be4 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:44:04 +0000 Subject: [PATCH 39/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 3a7a2a4..f807b06 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -49,6 +49,9 @@ jobs: retention-days: 5 token: ${{ secrets.test }} + - name: Check files before upload + run: find . + - uses: https://data.forgejo.org/actions/checkout@v4 - name: Upload Package run: | From 489be8de02893dbe54f0927b299919cc210eb360 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:47:12 +0000 Subject: [PATCH 40/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index f807b06..da4a4de 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,16 +41,13 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - name: Upload Artifact (für CI-Artefakt) - uses: actions/upload-artifact@v3 - with: - name: timetracker_${{github.ref_name}}.deb - path: timetracker_${{github.ref_name}}.deb - retention-days: 5 - token: ${{ secrets.test }} - - - name: Check files before upload - run: find . + #- name: Upload Artifact (für CI-Artefakt) + # uses: actions/upload-artifact@v3 + # with: + # name: timetracker_${{github.ref_name}}.deb + # path: timetracker_${{github.ref_name}}.deb + # retention-days: 5 + # token: ${{ secrets.test }} - uses: https://data.forgejo.org/actions/checkout@v4 - name: Upload Package From c7c194e5a560e350ac309dda57de95273481f5b2 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:49:53 +0000 Subject: [PATCH 41/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index da4a4de..c7cf39b 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -41,13 +41,13 @@ jobs: run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - #- name: Upload Artifact (für CI-Artefakt) - # uses: actions/upload-artifact@v3 - # with: - # name: timetracker_${{github.ref_name}}.deb - # path: timetracker_${{github.ref_name}}.deb - # retention-days: 5 - # token: ${{ secrets.test }} + - name: Upload Artifact (für CI-Artefakt) + uses: actions/upload-artifact@v3 + with: + name: timetracker_${{github.ref_name}}.deb + path: timetracker_${{github.ref_name}}.deb + retention-days: 5 + token: ${{ secrets.test }} - uses: https://data.forgejo.org/actions/checkout@v4 - name: Upload Package From 9a904bd48f3d586830cbc355899d940d971a5ae1 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:51:07 +0000 Subject: [PATCH 42/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index c7cf39b..76dfcd4 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -40,7 +40,6 @@ jobs: - name: Create Deb package run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - name: Upload Artifact (für CI-Artefakt) uses: actions/upload-artifact@v3 with: From 8ca4b1bc439817c35763656e4df68d6a58e80985 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 11:51:28 +0000 Subject: [PATCH 43/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 76dfcd4..1d1da14 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -39,7 +39,8 @@ jobs: - name: Create Deb package run: | - dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb + "dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb" + - name: Upload Artifact (für CI-Artefakt) uses: actions/upload-artifact@v3 with: From 84c39e351954d354e3f4a098971e356d27d5c393 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:21:02 +0000 Subject: [PATCH 44/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 1d1da14..37ba06f 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -55,7 +55,7 @@ jobs: FILE="timetracker_${{github.ref_name}}.deb" ORG="Ronny.Friedland" REPO="timetracker" - VERSION=$(git rev-parse --short HEAD) + VERSION=${{github.ref_name}} curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} \ --upload-file $FILE \ "https://${{ env.FORGEJO_BASE_URL }}/api/packages/${ORG}/generic/${REPO}/${VERSION}/${FILE}" From 438f8bfcf09794f6382ff9fcfcba6cab4260ec43 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:23:09 +0000 Subject: [PATCH 45/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 37ba06f..d10f357 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -39,8 +39,7 @@ jobs: - name: Create Deb package run: | - "dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb" - + dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - name: Upload Artifact (für CI-Artefakt) uses: actions/upload-artifact@v3 with: From 09966039b6160f22e124d53b5e7d849afcdb8cca Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:23:39 +0000 Subject: [PATCH 46/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index d10f357..edf0102 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -37,24 +37,3 @@ jobs: cp -Rf ./scripts/* PKG_SOURCE/var/lib/timetracker/ cp -Rf ./systemd/* PKG_SOURCE/lib/systemd/system/ - - name: Create Deb package - run: | - dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - - name: Upload Artifact (für CI-Artefakt) - uses: actions/upload-artifact@v3 - with: - name: timetracker_${{github.ref_name}}.deb - path: timetracker_${{github.ref_name}}.deb - retention-days: 5 - token: ${{ secrets.test }} - - - uses: https://data.forgejo.org/actions/checkout@v4 - - name: Upload Package - run: | - FILE="timetracker_${{github.ref_name}}.deb" - ORG="Ronny.Friedland" - REPO="timetracker" - VERSION=${{github.ref_name}} - curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} \ - --upload-file $FILE \ - "https://${{ env.FORGEJO_BASE_URL }}/api/packages/${ORG}/generic/${REPO}/${VERSION}/${FILE}" From 53eb6001a5bc9e2162f3deb247c42a02650cb723 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:23:50 +0000 Subject: [PATCH 47/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index edf0102..6b20df6 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -37,3 +37,6 @@ jobs: cp -Rf ./scripts/* PKG_SOURCE/var/lib/timetracker/ cp -Rf ./systemd/* PKG_SOURCE/lib/systemd/system/ + - name: Create Deb package + run: | + dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb From 1a2ef19c59591c95370b701e911497404f15f545 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:24:01 +0000 Subject: [PATCH 48/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 6b20df6..c6b7641 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -40,3 +40,11 @@ jobs: - name: Create Deb package run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb + - name: Upload Artifact (für CI-Artefakt) + uses: actions/upload-artifact@v3 + with: + name: timetracker_${{github.ref_name}}.deb + path: timetracker_${{github.ref_name}}.deb + retention-days: 5 + token: ${{ secrets.test }} + From 75e1d5f03aaf336105871d7bab7c186a363ed3db Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:24:35 +0000 Subject: [PATCH 49/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index c6b7641..e45331f 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -40,11 +40,22 @@ jobs: - name: Create Deb package run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb + - name: Upload Artifact (für CI-Artefakt) uses: actions/upload-artifact@v3 with: name: timetracker_${{github.ref_name}}.deb path: timetracker_${{github.ref_name}}.deb - retention-days: 5 + retention-days: 5 token: ${{ secrets.test }} + - uses: https://data.forgejo.org/actions/checkout@v4 + - name: Upload Package + run: | + FILE="timetracker_${{github.ref_name}}.deb" + ORG="Ronny.Friedland" + REPO="timetracker" + VERSION=${{github.ref_name}} + curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} \ + --upload-file $FILE \ + "https://${{ env.FORGEJO_BASE_URL }}/api/packages/${ORG}/generic/${REPO}/${VERSION}/${FILE}" From 2b8bfa6c93b0af61ba628a31746fe4c572d8dbc5 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:27:01 +0000 Subject: [PATCH 50/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index e45331f..12916e7 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -48,8 +48,6 @@ jobs: path: timetracker_${{github.ref_name}}.deb retention-days: 5 token: ${{ secrets.test }} - - - uses: https://data.forgejo.org/actions/checkout@v4 - name: Upload Package run: | FILE="timetracker_${{github.ref_name}}.deb" From e943de0425c1b82087825a588195c60444cd5367 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:38:49 +0000 Subject: [PATCH 51/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 12916e7..9162455 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -56,4 +56,4 @@ jobs: VERSION=${{github.ref_name}} curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} \ --upload-file $FILE \ - "https://${{ env.FORGEJO_BASE_URL }}/api/packages/${ORG}/generic/${REPO}/${VERSION}/${FILE}" + "https://edp.buildth.ing/api/packages/${ORG}/generic/${REPO}/${VERSION}/${FILE}" From 8ca87f58d3f088cb21905cd0394c53348502db32 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:42:08 +0000 Subject: [PATCH 52/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 9162455..2d67e0c 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -54,6 +54,6 @@ jobs: ORG="Ronny.Friedland" REPO="timetracker" VERSION=${{github.ref_name}} - curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} \ + curl -v --user ${{ secrets.USER }}:${{ secrets.TOKEN }} \ --upload-file $FILE \ "https://edp.buildth.ing/api/packages/${ORG}/generic/${REPO}/${VERSION}/${FILE}" From 0f3e43646476d09cd6e5aadf6be3a8896075e7e8 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Wed, 3 Sep 2025 12:44:58 +0000 Subject: [PATCH 53/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 2d67e0c..3a7bc68 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -54,6 +54,6 @@ jobs: ORG="Ronny.Friedland" REPO="timetracker" VERSION=${{github.ref_name}} - curl -v --user ${{ secrets.USER }}:${{ secrets.TOKEN }} \ + curl -v --header "Authorization: Bearer ${{ secrets.TEST }}" \ --upload-file $FILE \ "https://edp.buildth.ing/api/packages/${ORG}/generic/${REPO}/${VERSION}/${FILE}" From a50bc467016bc9490a2d3a17ea12d4299fdb9f07 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Fri, 5 Sep 2025 05:34:19 +0000 Subject: [PATCH 54/55] .forgejo/workflows/debian.yml aktualisiert --- .forgejo/workflows/debian.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/debian.yml b/.forgejo/workflows/debian.yml index 3a7bc68..0a0ed7e 100644 --- a/.forgejo/workflows/debian.yml +++ b/.forgejo/workflows/debian.yml @@ -40,7 +40,26 @@ jobs: - name: Create Deb package run: | dpkg-deb --build PKG_SOURCE timetracker_${{github.ref_name}}.deb - + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.test }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.test }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: timetracker_${{github.ref_name}}.deb + asset_name: timetracker_${{github.ref_name}}.deb + asset_content_type: application/zip - name: Upload Artifact (für CI-Artefakt) uses: actions/upload-artifact@v3 with: From 0bc6b81c8c31d1d7367337f84f91883c78ed26e9 Mon Sep 17 00:00:00 2001 From: "Ronny.Friedland" Date: Mon, 20 Oct 2025 11:28:07 +0000 Subject: [PATCH 55/55] =?UTF-8?q?.forgejo/workflows/openbao.yml=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .forgejo/workflows/openbao.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .forgejo/workflows/openbao.yml diff --git a/.forgejo/workflows/openbao.yml b/.forgejo/workflows/openbao.yml new file mode 100644 index 0000000..a74d4e4 --- /dev/null +++ b/.forgejo/workflows/openbao.yml @@ -0,0 +1,23 @@ +name: openbao + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - name: Read Openbao secrets + id: read-openbao-secrets + uses: hashicorp/vault-action@v2 + with: + url: https://vault-test.mms-at-work.de:8200 + token: ${{ secrets.VAULT_TEST_TOKEN }} + secrets: | + testproject/test/testproject foo | FOO + - name: Echo secret value from Openbao + run: echo "$FOO" \ No newline at end of file