Skip to content

Commit

Permalink
ci: add new CI job for testing05 and define steps for switching to ro…
Browse files Browse the repository at this point in the history
…ot user

- Add a new job `testing05` to the CI workflow
- Define steps for switching to the root user in the new job

Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Jan 6, 2024
1 parent 2451745 commit 76075ea
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,22 @@ jobs:
script_stop: true
script: |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
testing05:
name: switch user
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1

- name: switch root user
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script_stop: true
script: |
whoami && echo 'hello world' && touch todo.txt
sudo su - -c "whoami && echo 'hello world' && touch todo.txt"

0 comments on commit 76075ea

Please sign in to comment.