From 5d522122168f06068b55416027a229f8d49da597 Mon Sep 17 00:00:00 2001
From: appleboy <appleboy.tw@gmail.com>
Date: Sun, 23 Jul 2023 09:47:38 +0800
Subject: [PATCH] chore: Add allenvs flags

Signed-off-by: appleboy <appleboy.tw@gmail.com>
---
 .github/workflows/ci.yml | 16 ++++++++++++++++
 Dockerfile               |  2 +-
 action.yml               |  2 ++
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d1b576f..fe2b879 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -198,6 +198,21 @@ jobs:
           echo "I am $BAR, thanks"
           echo "I am $TEST_AAA, thanks"
 
+    - name: custom envs format
+      uses: ./
+      env:
+        INPUT_FOO: "BAR"
+        INPUT_AAA: "BBB"
+      with:
+        host: ${{ secrets.HOST }}
+        username: ${{ secrets.USERNAME }}
+        key: ${{ secrets.KEY }}
+        port: ${{ secrets.PORT }}
+        allenvs: true
+        script: |
+          echo "I am $INPUT_FOO, thanks"
+          echo "I am $INPUT_AAA, thanks"
+
   testing03:
     name: git clone and pull
     runs-on: ubuntu-latest
@@ -245,3 +260,4 @@ jobs:
         script_stop: true
         script: |
           echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
+
diff --git a/Dockerfile b/Dockerfile
index 533f0f9..7362566 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM ghcr.io/appleboy/drone-ssh:1.6.14
+FROM ghcr.io/appleboy/drone-ssh:latest
 
 COPY entrypoint.sh /entrypoint.sh
 RUN chmod +x /entrypoint.sh
diff --git a/action.yml b/action.yml
index 2e04181..405b14a 100644
--- a/action.yml
+++ b/action.yml
@@ -65,6 +65,8 @@ inputs:
     description: 'Flexible configuration for environment value transfer.'
   debug:
     description: 'Enable debug mode.'
+  allenvs:
+    description: 'pass all environment variable to shell script.'
 runs:
   using: 'docker'
   image: 'Dockerfile'