Skip to content

Commit

Permalink
Test docker build.
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwenyihust committed Nov 24, 2023
1 parent 8171edc commit 0359aa5
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: examples/word-count/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/word-count:latest

# - name: Docker Build
# run: |
# cd examples/word-count
# docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/word-count:latest .

# - name: Docker Push
# run: |
# cd examples/word-count
# docker tag word-count:latest ${{ secrets.DOCKERHUB_USERNAME }}/word-count:latest
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/word-count:latest
- name: Docker Build
run: |
cd examples/word-count
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/word-count:latest .
- name: Docker Push
run: |
cd examples/word-count
docker tag word-count:latest ${{ secrets.DOCKERHUB_USERNAME }}/word-count:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/word-count:latest

0 comments on commit 0359aa5

Please sign in to comment.