Repository: nektos/act (language: go)

Issue:
Act fails when tag doesn't start with "v"
### Bug report info

```plain text
act version:            0.2.68
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
Build info:
        Go version:            go1.21.13
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:         
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.68 -X main.commit=03a4480cd024910c88c8946da8d589b9ef0c6660 -X main.date=2024-10-01T02:31:47Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         03a4480cd024910c88c8946da8d589b9ef0c6660
                vcs.time:             2024-10-01T02:31:30Z
                vcs.modified:         false
Docker Engine:
        Engine version:        27.3.1
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         systemd
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    elementary OS 7.1 Horus
        OS type:               linux
        OS version:            7.1
        OS arch:               x86_64
        OS kernel:             6.8.0-48-generic
        OS CPU:                8
        OS memory:             15705 MB
        Security options:
                name=apparmor
                name=seccomp,profile=builtin
                name=cgroupns
```


### Command used with act

```sh
act
```


### Describe issue

Act incorrectly reports:

> Unable to resolve action `http://github.com/mad9000/actions-find-and-replace-string@5`, the provided ref `5` is the shortened version of a commit SHA, which is not supported. Please use the full commit SHA `51ad904dfdc3aea1a4f06e925a18a4cfddae7041` instead

The workflow is valid: https://github.com/mad9000/actions-find-and-replace-string/blob/main/.github/workflows/main.yml

### Link to GitHub repository

https://github.com/mad9000/actions-find-and-replace-string

### Workflow content

```yml
on: [push]

jobs:
  find-and-replace-job:
    runs-on: ubuntu-latest
    name: 'Find and replace on a string'
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Run find-and-replace to remove refs/heads/
        uses: mad9000/actions-find-and-replace-string@5
        id: findandreplace
        with:
          source: ${{ github.ref }}
          find: 'refs/heads/'
          replace: ''
      - name: Get the above output
        run: echo "The replaced value is ${{ steps.findandreplace.outputs.value }}"
      - name: Run find-and-replace to remove slashes
        uses: mad9000/actions-find-and-replace-string@5
        id: findandreplace2
        with:
          source: ${{ steps.findandreplace.outputs.value }}
          find: '/'
          replace: '-'
      - name: Get the final output
        run: echo "The replaced value is ${{ steps.findandreplace2.outputs.value }}"
```


### Relevant log output

```sh
☁  git clone 'http://github.com/mad9000/actions-find-and-replace-string' # ref=5
  cloning http://github.com/mad9000/actions-find-and-replace-string to /root/.cache/act/bb58a4f8ee533c336ce085aec3674f7930cd02c237df00206beaa4e78ed0a721
Unable to resolve action `http://github.com/mad9000/actions-find-and-replace-string@5`, the provided ref `5` is the shortened version of a commit SHA, which is not supported. Please use the full commit SHA `51ad904dfdc3aea1a4f06e925a18a4cfddae7041` instead
```


### Additional information

_No response_


Discussion / hints:
Is this already fixed in https://github.com/nektos/act/pull/2509? (at least I didn't migrate the error, while I'm now unshure if the test for this feature didn't work in my PR) there is `--use-new-action-cache` in your version as well to apply the change, but it has known defects (e.g. with docker actions) until my mentioned pr and is disabled by default.

I wonder what will GitHub actually plan with immutable actions, they already published an action that is used to publish them
- do they want to remove git tag/branch support for actions? 
- do they ignore the git tag if the same tag is in the ghcr registry?
- immutable actions use a version without v prefix

Fix patch:
diff --git a/pkg/common/git/git.go b/pkg/common/git/git.go
index 706f9ca5802..3c5af7b3f5c 100644
--- a/pkg/common/git/git.go
+++ b/pkg/common/git/git.go
@@ -330,7 +330,7 @@ func NewGitCloneExecutor(input NewGitCloneExecutorInput) common.Executor {
 			logger.Errorf("Unable to resolve %s: %v", input.Ref, err)
 		}
 
-		if hash.String() != input.Ref && strings.HasPrefix(hash.String(), input.Ref) {
+		if hash.String() != input.Ref && len(input.Ref) >= 4 && strings.HasPrefix(hash.String(), input.Ref) {
 			return &Error{
 				err:    ErrShortRef,
 				commit: hash.String(),


Test patch: