Skip to content

adding ;)

adding ;) #36

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