refactor: refactor sudo commands in GitHub actions

- Remove the line `name: login GitHub Container Registry`
- Add the line `name: sudo command`
- Remove the line `sudo su - -c whoami`
- Add the line `sudo whoami`

https://github.com/appleboy/ssh-action/issues/279
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2023-11-05 15:21:47 +08:00
parent 6f6abb1fa9
commit 95527f53d0
No known key found for this signature in database

View File

@ -269,7 +269,7 @@ jobs:
- name: checkout - name: checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: login GitHub Container Registry - name: sudo command
uses: ./ uses: ./
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
@ -278,4 +278,4 @@ jobs:
port: ${{ secrets.PORT }} port: ${{ secrets.PORT }}
script_stop: true script_stop: true
script: | script: |
sudo su - -c whoami sudo whoami