Skip to content

Commit d87d276

Browse files
authored
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: #230
1 parent 3130c7a commit d87d276

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,3 +216,32 @@ jobs:
216216
script: |
217217
git clone https://appleboy:${{ secrets.TEST_TOKEN }}@github.com/go-training/self-runner.git test_repository
218218
rm -rf test_repository
219+
220+
testing04:
221+
name: docker login and pull
222+
runs-on: ubuntu-latest
223+
steps:
224+
- name: checkout
225+
uses: actions/checkout@v1
226+
227+
- name: login GitHub Container Registry
228+
uses: ./
229+
with:
230+
host: ${{ secrets.HOST }}
231+
username: ${{ secrets.USERNAME }}
232+
key: ${{ secrets.KEY }}
233+
port: ${{ secrets.PORT }}
234+
script_stop: true
235+
script: |
236+
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u github.actor --password-stdin
237+
238+
- name: login DockerHub Container Registry
239+
uses: ./
240+
with:
241+
host: ${{ secrets.HOST }}
242+
username: ${{ secrets.USERNAME }}
243+
key: ${{ secrets.KEY }}
244+
port: ${{ secrets.PORT }}
245+
script_stop: true
246+
script: |
247+
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin

0 commit comments

Comments
 (0)