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>
This commit is contained in:
Bo-Yi Wu 2023-11-05 15:13:39 +08:00
parent 4330a1ea48
commit 6f6abb1fa9
No known key found for this signature in database

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: login GitHub Container Registry
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script_stop: true
script: |
sudo su - -c whoami