Skip to content

Commit bf308ec

Browse files
authored
ci: use docker login action (yiisoft#109)
1 parent c33e8c1 commit bf308ec

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/docker-image.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,12 @@ jobs:
9494
docker-compose run --rm php php /tests/requirements.php
9595
docker-compose run --rm -w /yii2 php composer install --prefer-dist
9696
docker-compose run --rm -w /yii2 php php -d error_reporting="E_ALL ^ E_DEPRECATED" vendor/bin/phpunit tests/framework/ --exclude db
97-
- name: Build and Push
97+
- name: Login to Docker
9898
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master'
99-
run: |
100-
echo ${{ secrets.DOCKERHUB_PASS }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin
101-
docker-compose push
99+
uses: docker/login-action@v1
100+
with:
101+
username: ${{ secrets.DOCKERHUB_USER }}
102+
password: ${{ secrets.DOCKERHUB_PASS }}
103+
- name: Push docker image
104+
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master'
105+
run: docker-compose push

0 commit comments

Comments
 (0)