Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: act does not seem to rebuild docker images for local actions #814

Closed
henrikrudstrom opened this issue Sep 13, 2021 · 9 comments
Closed
Labels
kind/bug Something isn't working

Comments

@henrikrudstrom
Copy link

System information

  • Operating System: xmacOS
  • Architecture: x64 (64-bit)x
  • Apple M1: no
  • Docker version: 20.10.7
  • Docker image used in act: < can be omitted if it's included in log >
  • act version: 0.2.24

Expected behaviour

i have a github workflow that references several local actions:

on:
  pull_request:
  push:
      branches:
      - master
  create:

jobs:
  validate_configurations:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ./tools/actions/check-generated-files
      - uses: ./tools/actions/validate-schema

These actions use a common docker file:

name: 'Validate Schema'
description: 'Validates schema for generated files'
runs:
  using: 'docker'
  image: '../../Dockerfile'
  args:
    - check
    - --input=src
    - --output=dist
    - src/engine-config/sites/*.json

i would expect this to run fine with act -b pull_request

Actual behaviour

[validate-schema.yaml/validate_configurations] ⭐  Run ./tools/actions/check-generated-files
[validate-schema.yaml/validate_configurations]   🐳  docker build -t act-tools-actions-check-generated-files:latest --platform  /Users/henrikrudstrom/dev/amedia/andorra-config/tools/actions/check-generated-files
[validate-schema.yaml/validate_configurations]   ❌  Failure - ./tools/actions/check-generated-files
Error: Error response from daemon: pull access denied for act-tools-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Verbose output:
act -b -v pull_request

[validate-schema.yaml/validate_configurations] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:pull_request GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:validate_configurations GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/poc-generate-configs GITHUB_REPOSITORY:amedia/andorra-config GITHUB_REPOSITORY_OWNER:amedia GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:4c45f49c18f9527e469d5ab6ce8790de58d20f6d GITHUB_TOKEN: GITHUB_WORKFLOW:validate-schema.yaml GITHUB_WORKSPACE:/Users/henrikrudstrom/dev/amedia/andorra-config IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.17.6/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
[validate-schema.yaml/validate_configurations] ⭐  Run ./tools/github-actions/check-generated-files
DEBU[0000] Read action &{Validate Schema  Validates schema for generated files map[] map[] {docker map[]  ../../Dockerfile [] [check --input=src --output=dist src/engine-config/sites/*.json] []} { }} from 'Unknown' 
DEBU[0000] About to run action &{Validate Schema  Validates schema for generated files map[] map[] {docker map[]  ../../Dockerfile [] [check --input=src --output=dist src/engine-config/sites/*.json] []} { }} 
DEBU[0000] type=2 actionDir=/Users/henrikrudstrom/dev/amedia/andorra-config/tools/github-actions/check-generated-files actionPath= Workdir=/Users/henrikrudstrom/dev/amedia/andorra-config ActionCacheDir=/Users/henrikrudstrom/.cache/act actionName=./tools/github-actions/check-generated-files containerActionDir=/Users/henrikrudstrom/dev/amedia/andorra-config/tools/github-actions/check-generated-files 
DEBU[0000] image 'act-tools-github-actions-check-generated-files:latest' for architecture '' will be built from context '/Users/henrikrudstrom/dev/amedia/andorra-config/tools/github-actions/check-generated-files 
DEBU[0000] Loading slug from git directory '/Users/henrikrudstrom/dev/amedia/andorra-config/.git' 
DEBU[0000] Found revision: 4c45f49c18f9527e469d5ab6ce8790de58d20f6d 
DEBU[0000] Loading revision from git directory '/Users/henrikrudstrom/dev/amedia/andorra-config/.git' 
DEBU[0000] Found revision: 4c45f49c18f9527e469d5ab6ce8790de58d20f6d 
DEBU[0000] HEAD points to '4c45f49c18f9527e469d5ab6ce8790de58d20f6d' 
DEBU[0000] using github ref: refs/heads/poc-generate-configs 
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.17.6/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] 
DEBU[0000] context needs => map[]                       
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:pull_request GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:validate_configurations GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/poc-generate-configs GITHUB_REPOSITORY:amedia/andorra-config GITHUB_REPOSITORY_OWNER:amedia GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:4c45f49c18f9527e469d5ab6ce8790de58d20f6d GITHUB_TOKEN: GITHUB_WORKFLOW:validate-schema.yaml GITHUB_WORKSPACE:/Users/henrikrudstrom/dev/amedia/andorra-config IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.17.6/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] 
[validate-schema.yaml/validate_configurations]   🐳  docker build -t act-tools-github-actions-check-generated-files:latest --platform  /Users/henrikrudstrom/dev/amedia/andorra-config/tools/github-actions/check-generated-files
[validate-schema.yaml/validate_configurations] Building image from '/Users/henrikrudstrom/dev/amedia/andorra-config/tools/github-actions/check-generated-files'
[validate-schema.yaml/validate_configurations] Creating image from context dir '/Users/henrikrudstrom/dev/amedia/andorra-config/tools/github-actions/check-generated-files' with tag 'act-tools-github-actions-check-generated-files:latest' and platform ''
[validate-schema.yaml/validate_configurations]   🐳  docker pull act-tools-github-actions-check-generated-files:latest
DEBU[0001] Image exists? false                          
[validate-schema.yaml/validate_configurations] pulling image 'docker.io/library/act-tools-github-actions-check-generated-files:latest' ()
DEBU[0002] Error response from daemon: pull access denied for act-tools-github-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied 
DEBU[0002] Error response from daemon: pull access denied for act-tools-github-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied 
DEBU[0002] Error response from daemon: pull access denied for act-tools-github-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied 
DEBU[0002] Error response from daemon: pull access denied for act-tools-github-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied 
[validate-schema.yaml/validate_configurations]   ❌  Failure - ./tools/github-actions/check-generated-files
DEBU[0002] Error response from daemon: pull access denied for act-tools-github-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied 
DEBU[0002] Error response from daemon: pull access denied for act-tools-github-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied 
DEBU[0002] Error response from daemon: pull access denied for act-tools-github-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied 
DEBU[0002] Error response from daemon: pull access denied for act-tools-github-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied 
Error: Error response from daemon: pull access denied for act-tools-github-actions-check-generated-files, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
@henrikrudstrom henrikrudstrom added the kind/bug Something isn't working label Sep 13, 2021
@ChristopherHX
Copy link
Contributor

Related to #739
You are using image: '../../Dockerfile' which is broken / not supported in act and might cause docker build to error out.

@github-actions
Copy link
Contributor

Issue is stale and will be closed in 14 days unless there is new activity

@L-Sypniewski
Copy link

I'm having the same issue and my image path doesn't use relative paths:

runs:
  using: "docker"
  image: "dockerfile"
  args:
    - "-o"
    - ${{ inputs.owner }}
    - "-n"
    - ${{ inputs.name }}
    - "-p"
    - ${{ inputs.pr_number }}

It looks like act has cached an image and cannot pull the latest one. When I run act with --pull flag I get the following erorr: Error response from daemon: pull access denied for act-l-sypniewski-github-pr-changes-checker-action-master-dockeraction, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. Everything works fine on Github Actions.

Here's a repo that I work on: https://github.com/L-Sypniewski/github-pr-changes-checker-action/

My act version: 0.2.30
MacOS version: 12.4 (21F79)

@DawidNiezgodka
Copy link

@L-Sypniewski Did you manage to solve the problem?

@L-Sypniewski
Copy link

@DawidNiezgodka No, I used docker-compose for local testing. I've just checked and I'm having the same issue with version 0.2.42

@ChristopherHX
Copy link
Contributor

The --pull docker action problem has been fixed via #1599

Needs version 0.2.43 (to be released on 1. March 2023 by scheduled cron workflow)

Your bug report about --pull (now defaults to true) got lost in this unrelated issue

--rebuild now defaults to true so docker actions should be rebuild in 0.2.43 without adding cli flags.

@loeken
Copy link

loeken commented Mar 11, 2023

https://aur.archlinux.org/packages/act @ChristopherHX have there been issues with the release i can only see 0.2.42 in aur

@catthehacker
Copy link
Member

@loeken we do not manage AUR package, you should ask package maintainer to update it

@guettli
Copy link

guettli commented Jun 16, 2023

I confirm: updating to 0.2.46 fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants