shimataro / ssh-key-action

GitHub Action that installs SSH key to .ssh
https://github.com/marketplace/actions/install-ssh-key
MIT License
581 stars 87 forks source link

python2 error #206

Closed huhuang03 closed 2 years ago

huhuang03 commented 2 years ago

The error log in github actions is:

Build container for action use: '/home/runner/work/_actions/Borales/actions-yarn/v2.3.0/Dockerfile'.
  /usr/bin/docker build -t 5364e3:0b59324d8a3048e3a6d51729d29eb77c -f "/home/runner/work/_actions/Borales/actions-yarn/v2.3.0/Dockerfile" "/home/runner/work/_actions/Borales/actions-yarn/v2.3.0"
  Sending build context to Docker daemon  7.168kB

  Step 1/6 : FROM node:lts-alpine
  lts-alpine: Pulling from library/node
  213ec9aee27d: Already exists
  bb60732a8e9f: Pulling fs layer
  9f61bc6ef19c: Pulling fs layer
  8de0f21617f6: Pulling fs layer
  8de0f21617f6: Verifying Checksum
  8de0f21617f6: Download complete
  9f61bc6ef19c: Verifying Checksum
  9f61bc6ef19c: Download complete
  bb60732a8e9f: Verifying Checksum
  bb60732a8e9f: Download complete
  bb60732a8e9f: Pull complete
  9f61bc6ef19c: Pull complete
  8de0f21617f6: Pull complete
  Digest: sha256:7584b116f368d94fab2ecc21ebbcfd5434a3427c2f96f846972821b5ad0266fc
  Status: Downloaded newer image for node:lts-alpine
   ---> f7ef5856dc1f
  Step 2/6 : RUN apk add --no-cache git python2 build-base
   ---> Running in b2de8a6d0639
  fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
  fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
  ERROR: unable to select packages:
    python2 (no such package):
      required by: world[python2]
  The command '/bin/sh -c apk add --no-cache git python2 build-base' returned a non-zero code: 1
  Warning: Docker build failed with exit code 1, back off 6.[47](https://github.com/endless-mirage/xx-shop-admin/actions/runs/3202280208/jobs/5231106161#step:2:47)7 seconds before retry.

The gitaction.yml:

  build-deploy:
    runs-on: ubuntu-latest
    concurrency: production
    steps:
    - name: Install ssh key
      uses: shimataro/ssh-key-action@v2.3.1
      with:
        key: ${{ secrets.SSH_GITHUB_ACTION }}
        known_hosts: 'just-a-placeholder-so-we-dont-get-errors'

How can I fix this?

siebrand-bauer commented 2 years ago

Not absolutely sure I'm giving you the right answer, but shouldn't you set "known_hosts: unnecessary"?

huhuang03 commented 2 years ago

Maybe it's some other issue. Some package require python2 and now is not avaliable for current ubuntu.