appleboy / scp-action

GitHub Action that copy files and artifacts via SSH.
https://github.com/marketplace/actions/scp-command-to-transfer-files
MIT License
1.14k stars 134 forks source link

Your DNS server does not resolve my domain correctly #149

Open popov654 opened 7 months ago

popov654 commented 7 months ago

I have the following action code:

name: Deploy

on:
  push:
    branches:
      - master

jobs:
  deployment:

    runs-on: ubuntu-latest
    environment: main

    steps:
    - uses: actions/checkout@v1

    - name: Copy repository contents via scp
      uses: appleboy/scp-action@master
      with:
        HOST: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.USERNAME }}
        PASSWORD: ${{ secrets.PASSWORD }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSHKEY }}
        source: "."
        target: "/opt/cloudfave"

    - name: Executing remote command
      uses: appleboy/ssh-action@master
      with:
        host: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.USERNAME }}
        PASSWORD: ${{ secrets.PASSWORD }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSHKEY }}
        script: sudo npm install && sudo systemctl restart nodeserver

It gives me this error on execution:

drone-scp error: error copy file to dest: ***, error message: dial tcp: lookup *** on 168.63.129.16:53: no such host

I don't want to use an IP address in my variables since it may change in the future. Should not DNS work correctly?

VictorioBerra commented 4 weeks ago

Similar issue with me but with Tailscale. I am not an expert on Actions but why would it not use DNS from the Action host?