I want to create a GitHub Action that uses docker and want to run it locally using act
. When I execute the act
command, I get the following error: Error response from daemon: pull access denied for act-github-actions-dockeraction, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
.`
I use the following files to build the action:
- Dockerfile
FROM alpine
RUN apk add --no-cache jq
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
- action.yml
name: test
description: test
runs:
using: docker
image: Dockerfile
inputs:
jq_selector:
description: "The jq selector to execute"
required: false
default: '.'
- show_event.yml
name: shows event with jq selector
on:
push:
branches: [main]
jobs:
output-debug:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: where am i
run: pwd
- name: my custom action
uses: ./.github/actions
with:
jq_selector: "."
The files are arranged in the .github folder in the following way:
├── actions
│ ├── Dockerfile
│ ├── action.yaml
│ └── entrypoint.sh
└── workflows
├── show_event.yml
Even though I executed the docker login
command and got: Authenticating with existing credentials...Login Succeeded
, I'm getting the same error over and over again. Do I need to auth act
in any specific way?
EDIT: Some extra info after having analysed the logs.
When I analyze the act
logs, I can see some strange behavior. After some initialization steps, act
builds an image from my docker file, which is quite typical: docker build -t act-github-actions-dockeraction:latest repo/.github/actions
.
Surprisingly, it then tries to pull this image instead of running it directly: docker pull image=act-github-actions-dockeraction:latest platform= username=*** forcePull=true
. Since it has just built the image locally, no wonder it is not accessible via a pull from the docker hub (is it the docker hub, actually?).
The question is, how to make it run the image directly?