adding ;) #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build-Test-Push | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: fetch code | |
uses: actions/checkout@v2 | |
- name: build Docker image | |
run: docker build -t test-image . | |
- name: run Docker container | |
run: docker run -d -p 80:80 test-image | |
- name: run tests | |
uses: liatrio/github-actions/apprentice-action@808117af9b4a1e57c4cb79dbcb2d25de5ea3c68d | |
- name: log in to Docker Hub | |
run: docker login -u ${{ secrets.DOCKER_USER_NAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
- name: list Docker images(debug) | |
run: docker images | |
- name: tag Docker image | |
run: docker tag test-image ${{ secrets.DOCKER_USER_NAME }}/test-image | |
- name: push Docker image to Docker Hub | |
run: docker push ${{ secrets.DOCKER_USER_NAME }}/test-image |