From 5b00e6d1bdea95e427c32f469c6c9b697100337a Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 6 Jan 2024 10:30:32 +0800 Subject: [PATCH] ci: add new CI job for testing05 with GitHub Container Registry login - Add a new job called `testing05` to the CI workflow - Define steps for the `testing05` job, including a login to GitHub Container Registry - Include a script in the `testing05` job to execute specific commands Signed-off-by: Bo-Yi Wu --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9f2b7c..8097666 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: login GitHub Container Registry + 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"