10up / wpcs-action

GitHub Action to help you lint your PHP without additional dependencies within your codebase
MIT License
54 stars 13 forks source link

APK update failing in build #19

Closed bahiirwa closed 1 year ago

bahiirwa commented 1 year ago

Describe the bug

Thank you for thie great tool. However, I am experiencing a docker error when I try to run script in GH.

This is the error warning before it fails.

Step 4/5 : RUN apk update &&     apk upgrade &&     apk add git
   ---> Running in e8ac60939246
  /bin/sh: 1: apk: not found
  The command '/bin/sh -c apk update &&     apk upgrade &&     apk add git' returned a non-zero code: 127

  Warning: Docker build failed with exit code 127, back off 2.636 seconds before retry.
  /usr/bin/docker build -t 8d5581:5e73608f14b24f4090f6e8cff87c5034 -f "/home/runner/work/_actions/10up/wpcs-action/stable/Dockerfile" "/home/runner/work/_actions/10up/wpcs-action/stable"

Fail message

   ---> Running in 4848c4e0ee45
  /bin/sh: 1: apk: not found
  The command '/bin/sh -c apk update &&     apk upgrade &&     apk add git' returned a non-zero code: 127

Error: Docker build failed with exit code 127

Steps to Reproduce

Use github action yml file

name: WordPress Coding Standard checks.

on: pull_request

jobs:
  phpcs:
      name: WPCS
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - name: WPCS check
          uses: 10up/wpcs-action@stable
          with:
            enable_warnings: false # Enable checking for warnings (-w)
            paths: '.' # Paths to check, space separated
            excludes: '' # Paths to excludes, space separated
            standard: 'WordPress' # Standard to use. Accepts WordPress|WordPress-Core|WordPress-Docs|WordPress-Extra|WordPress-VIP-Go|WordPressVIPMinimum.
            standard_repo: '' # Public (git) repository URL of the coding standard
            repo_branch: 'main' # Branch of Standard repository
            phpcs_bin_path: 'phpcs' # Custom PHPCS bin path
            use_local_config: true # Use local config if available

Add new code and run to check for WPCS errors

Screenshots, screen recording, code snippet

Screenshot 2022-10-31 at 05 45 03

Environment information

No response

WordPress information

No response

Code of Conduct

jeffpaul commented 1 year ago

@bahiirwa we've got a tentative minor release scheduled that will hopefully resolve this, please keep an eye for a release in the repo here and we can re-test then to see if that resolves your issue

jeffpaul commented 1 year ago

@bahiirwa did v1.4.0 resolve this for you?

bahiirwa commented 1 year ago

Fixed: I am no longer having issues with this. Thanks.