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.

35 lines
917 B

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