You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
891 B

  1. name: Publish Docker image
  2. on:
  3. release:
  4. types: [published]
  5. jobs:
  6. push_to_registry:
  7. name: Push Docker image to Docker Hub
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Check out the repo
  11. uses: actions/checkout@v2
  12. - name: Log in to Docker Hub
  13. uses: docker/login-action@v1
  14. with:
  15. username: ${{ secrets.DOCKER_USERNAME }}
  16. password: ${{ secrets.DOCKER_PASSWORD }}
  17. - name: Extract metadata (tags, labels) for Docker
  18. id: meta
  19. uses: docker/metadata-action@v3
  20. with:
  21. images: mirobertod/healthchecks
  22. - name: Build and push Docker image
  23. uses: docker/build-push-action@v2
  24. with:
  25. context: .
  26. file: docker/Dockerfile
  27. push: true
  28. tags: ${{ steps.meta.outputs.tags }}
  29. labels: ${{ steps.meta.outputs.labels }}