[GH-ISSUE #985] While attempting to pull image, Act throws: Error: invalid reference format #582

Closed
opened 2026-03-01 21:44:42 +03:00 by kerem · 1 comment
Owner

Originally created by @fisherpro on GitHub (Feb 8, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/985

System information

- Operating System: macOS
- Architecture: arm64 (64-bit) M1 Apple
- Apple M1: yes
- Docker version: 20.10.12
- Docker image used in `act`: < can be omitted if it's included in log >
- `act` version: act version HEAD-e23223a

Expected behaviour

Docker image successfully pulls.

Actual behaviour

❯ act
[Build and Test/build-test   ] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-20.04
[Build and Test/build-test   ]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-20.04  platform=linux/amd64     username= forcePull=false
ERRO[0000] invalid reference format
 Error: invalid reference format

Configuration

❯ cat ~/.actrc
-P sdp-im887-imali=ghcr.io/catthehacker/ubuntu:act-20.04
--container-architecture linux/amd64

Without the -P above, I get the following warning message:

❯ act -l
WARN  ⚠ You are using Apple M1 chip and you have not specified container architecture, you might encounter issues while running act. 
If so, try running it with '--container-architecture linux/amd64'.

Workflow and/or repository

name: Build and Test
on: push
jobs:
  build-test:
    runs-on: sdp-im887-imali
    steps:
      - name: BUILD AND TEST
        run: echo "built and tested successfully"

Steps to reproduce

Run act command.

act output

Log
❯ act -v
DEBU[0000] Loading environment from /Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.env
DEBU[0000] Loading secrets from /Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.secrets
DEBU[0000] Loading workflows from '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows'
DEBU[0000] Loading workflows recursively
DEBU[0000] Found workflow 'ci.yaml' in '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/ci.yaml'
DEBU[0000] Found workflow 'cicd.yaml' in '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/cicd.yaml'
DEBU[0000] Reading workflow '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/ci.yaml'
DEBU[0000] Correcting if statements '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/ci.yaml'
DEBU[0000] Reading workflow '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/cicd.yaml'
DEBU[0000] Correcting if statements '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/cicd.yaml'
DEBU[0000] Planning event: push
DEBU[0000] Loading slug from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git'
DEBU[0000] Loading revision from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git'
DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc
DEBU[0000] HEAD points to '5e9df33e966f8aa468cafea62ad436e71fe861bc'
DEBU[0000] using github ref: refs/heads/master
DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc
DEBU[0000] expression 'success()' evaluated to 'true'
[Build and Test/build-test] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-20.04
DEBU[0000] Loading slug from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git'
DEBU[0000] Loading revision from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git'
DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc
DEBU[0000] HEAD points to '5e9df33e966f8aa468cafea62ad436e71fe861bc'
DEBU[0000] using github ref: refs/heads/master
DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc
[Build and Test/build-test]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-20.04  platform=linux/amd64 username= forcePull=false
[Build and Test/build-test]   🐳  docker pull ghcr.io/catthehacker/ubuntu:act-20.04
DEBU[0000] Image exists? false
ERRO[0000] invalid reference format
[Build and Test/build-test] pulling image '' (linux/amd64)
DEBU[0000] invalid reference format
DEBU[0000] invalid reference format
DEBU[0000] invalid reference format
DEBU[0000] invalid reference format
DEBU[0000] invalid reference format
DEBU[0000] invalid reference format
DEBU[0000] invalid reference format
DEBU[0000] invalid reference format
DEBU[0000] invalid reference format
DEBU[0000] invalid reference format
DEBU[0000] Loading slug from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git'
DEBU[0000] Loading revision from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git'
DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc
DEBU[0000] HEAD points to '5e9df33e966f8aa468cafea62ad436e71fe861bc'
DEBU[0000] using github ref: refs/heads/master
DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc
DEBU[0000] invalid reference format
Error: invalid reference format
Originally created by @fisherpro on GitHub (Feb 8, 2022). Original GitHub issue: https://github.com/nektos/act/issues/985 <!-- - Make sure you are able to reproduce it on the [latest version](https://github.com/nektos/act/releases) - Search the existing issues. - Refer to [README](https://github.com/nektos/act/blob/master/README.md). --> ## System information - Operating System: macOS - Architecture: arm64 (64-bit) M1 Apple - Apple M1: yes - Docker version: 20.10.12 - Docker image used in `act`: < can be omitted if it's included in log > - `act` version: act version HEAD-e23223a ## Expected behaviour Docker image successfully pulls. ## Actual behaviour ❯ act [Build and Test/build-test ] 🚀 Start image=ghcr.io/catthehacker/ubuntu:act-20.04 [Build and Test/build-test ] 🐳 docker pull image=ghcr.io/catthehacker/ubuntu:act-20.04 platform=linux/amd64 username= forcePull=false ERRO[0000] invalid reference format Error: invalid reference format ## Configuration ❯ cat ~/.actrc -P sdp-im887-imali=ghcr.io/catthehacker/ubuntu:act-20.04 --container-architecture linux/amd64 Without the -P above, I get the following warning message: ❯ act -l WARN ⚠ You are using Apple M1 chip and you have not specified container architecture, you might encounter issues while running act. If so, try running it with '--container-architecture linux/amd64'. ## Workflow and/or repository ``` name: Build and Test on: push jobs: build-test: runs-on: sdp-im887-imali steps: - name: BUILD AND TEST run: echo "built and tested successfully" ``` </details> ## Steps to reproduce Run act command. ## `act` output <details> <summary>Log</summary> ```none ❯ act -v DEBU[0000] Loading environment from /Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.env DEBU[0000] Loading secrets from /Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.secrets DEBU[0000] Loading workflows from '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows' DEBU[0000] Loading workflows recursively DEBU[0000] Found workflow 'ci.yaml' in '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/ci.yaml' DEBU[0000] Found workflow 'cicd.yaml' in '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/cicd.yaml' DEBU[0000] Reading workflow '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/ci.yaml' DEBU[0000] Correcting if statements '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/ci.yaml' DEBU[0000] Reading workflow '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/cicd.yaml' DEBU[0000] Correcting if statements '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.github/workflows/cicd.yaml' DEBU[0000] Planning event: push DEBU[0000] Loading slug from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git' DEBU[0000] Loading revision from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git' DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc DEBU[0000] HEAD points to '5e9df33e966f8aa468cafea62ad436e71fe861bc' DEBU[0000] using github ref: refs/heads/master DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc DEBU[0000] expression 'success()' evaluated to 'true' [Build and Test/build-test] 🚀 Start image=ghcr.io/catthehacker/ubuntu:act-20.04 DEBU[0000] Loading slug from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git' DEBU[0000] Loading revision from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git' DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc DEBU[0000] HEAD points to '5e9df33e966f8aa468cafea62ad436e71fe861bc' DEBU[0000] using github ref: refs/heads/master DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc [Build and Test/build-test] 🐳 docker pull image=ghcr.io/catthehacker/ubuntu:act-20.04 platform=linux/amd64 username= forcePull=false [Build and Test/build-test] 🐳 docker pull ghcr.io/catthehacker/ubuntu:act-20.04 DEBU[0000] Image exists? false ERRO[0000] invalid reference format [Build and Test/build-test] pulling image '' (linux/amd64) DEBU[0000] invalid reference format DEBU[0000] invalid reference format DEBU[0000] invalid reference format DEBU[0000] invalid reference format DEBU[0000] invalid reference format DEBU[0000] invalid reference format DEBU[0000] invalid reference format DEBU[0000] invalid reference format DEBU[0000] invalid reference format DEBU[0000] invalid reference format DEBU[0000] Loading slug from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git' DEBU[0000] Loading revision from git directory '/Users/jxc07rc/src/imali/im887-imali-ecs-cluster/.git' DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc DEBU[0000] HEAD points to '5e9df33e966f8aa468cafea62ad436e71fe861bc' DEBU[0000] using github ref: refs/heads/master DEBU[0000] Found revision: 5e9df33e966f8aa468cafea62ad436e71fe861bc DEBU[0000] invalid reference format Error: invalid reference format ``` </details>
kerem 2026-03-01 21:44:42 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@fisherpro commented on GitHub (Feb 8, 2022):

The reason this occurs is because of an extra space added to the end of the -P line in ~/actrc file. If you remove the space after the image name, everything works. so this is a parsing bug. spaces should be ignored.

<!-- gh-comment-id:1033047176 --> @fisherpro commented on GitHub (Feb 8, 2022): The reason this occurs is because of an extra space added to the end of the -P line in ~/actrc file. If you remove the space after the image name, everything works. so this is a parsing bug. spaces should be ignored.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#582
No description provided.