diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index c8c2fe1..119d0f4 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -8,11 +8,25 @@ on: jobs: - build: +# build: + +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - name: Build the Docker image +# run: docker build . --file Dockerfile --tag fit:$(date +%s) + + push_to_registry: + name: Push Docker image to Docker Hub runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag fit:$(date +%s) + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: sedflix/fit + tag_with_ref: true