Act fails when tag doesn't start with "v"
Opened this issue · 2 comments
Bug report info
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
act
Describe issue
Act incorrectly reports:
Unable to resolve action
http://github.com/mad9000/actions-find-and-replace-string@5
, the provided ref5
is the shortened version of a commit SHA, which is not supported. Please use the full commit SHA51ad904dfdc3aea1a4f06e925a18a4cfddae7041
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
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
☁ 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
Is this already fixed in #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
It might have fixed it, I didn't try that! I wanted to report it since I didn't see any other issues, not sure when I'll be able to test though