mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix: sum256 the container name so derivations do not overflow (#191)
For instance, the volume name derived from the workflow name may exceed the file system limit when the container name it is derived from is too long. Fixes forgejo/runner#152 Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/191 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
7e1a84b400
commit
53e26e56b1
4 changed files with 28 additions and 5 deletions
13
act/common/sha256_test.go
Normal file
13
act/common/sha256_test.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2025 The Forgejo Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
package common
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSha256(t *testing.T) {
|
||||
assert.Equal(t, "3fc9b689459d738f8c88a3a48aa9e33542016b7a4052e001aaa536fca74813cb", Sha256("something"))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue