Compare commits

..

3 Commits

Author SHA1 Message Date
Bo-Yi Wu
975ac6671d
Merge a8507403de into 95527f53d0 2023-11-05 18:36:10 +09:00
Bo-Yi Wu
95527f53d0
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>
2023-11-05 15:21:47 +08:00
Bo-Yi Wu
6f6abb1fa9
ci: add new job for testing05 in ci.yml
- Add a new job named "testing05" in the ci.yml file
- The job runs on ubuntu-latest
- The job includes steps for checkout and login to GitHub Container Registry
- The login step uses secrets for host, username, key, and port
- The login step includes a script for executing a command

https://github.com/appleboy/ssh-action/issues/279
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-11-05 15:13:39 +08:00

View File

@ -6,7 +6,6 @@ env:
BAR: "FOO" BAR: "FOO"
jobs: jobs:
testing01: testing01:
name: default flag testing name: default flag testing
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -263,3 +262,20 @@ jobs:
script: | script: |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
testing05:
name: sudo command
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: sudo command
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script_stop: true
script: |
sudo whoami