From 4c281b6672c7ece53fcdae897340c2d6ea17a513 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 18 Apr 2023 09:23:03 +0800 Subject: [PATCH] ci: add Docker login and pull job to CI pipeline - Add a new job named "testing04" for docker login and pull in ci.yml file. Signed-off-by: Bo-Yi Wu --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9da0438..7744086 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -216,3 +216,21 @@ jobs: script: | git clone https://appleboy:${{ secrets.TEST_TOKEN }}@github.com/go-training/self-runner.git test_repository rm -rf test_repository + + testing04: + name: docker login and pull + 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: | + echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u github.actor --password-stdin