From 86881186f7121112a7169020112ed98896886ec5 Mon Sep 17 00:00:00 2001 From: appleboy Date: Sat, 20 Jul 2024 13:21:26 +0800 Subject: [PATCH] ci: enhance GitHub Actions with secret variable support - Add a step to pass secret variables in the shell within the GitHub Actions workflow Signed-off-by: appleboy --- .github/workflows/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4a92da..247131b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -459,6 +459,15 @@ jobs: echo "$GITHUB_BASE_REF" echo "$GITHUB_REF" + - name: pass secret variable in shell + uses: ./ + with: + host: ${{ env.REMOTE_HOST }} + username: linuxserver.io + key: ${{ env.PRIVATE_KEY }} + port: 2222 + script: cd ${{ secrets.PORT }} + - name: switch to root user uses: ./ with: