ci: add Docker login and pull job to CI pipeline (#244)
- Add a new job named "testing04" for docker login and pull in ci.yml file. ref: https://github.com/appleboy/ssh-action/issues/230
This commit is contained in:
parent
3130c7a2bc
commit
d87d276960
|
@ -216,3 +216,32 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
git clone https://appleboy:${{ secrets.TEST_TOKEN }}@github.com/go-training/self-runner.git test_repository
|
git clone https://appleboy:${{ secrets.TEST_TOKEN }}@github.com/go-training/self-runner.git test_repository
|
||||||
rm -rf 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
|
||||||
|
|
||||||
|
- name: login DockerHub Container Registry
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
key: ${{ secrets.KEY }}
|
||||||
|
port: ${{ secrets.PORT }}
|
||||||
|
script_stop: true
|
||||||
|
script: |
|
||||||
|
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
||||||
|
|
Loading…
Reference in New Issue