docker.yml 972 B

123456789101112131415161718192021222324252627282930313233
  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@v3
  12. - name: Log in to Docker Hub
  13. uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
  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@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
  20. with:
  21. images: yidadaa/chatgpt-next-web
  22. - name: Build and push Docker image
  23. uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
  24. with:
  25. context: .
  26. push: true
  27. tags: ${{ steps.meta.outputs.tags }}
  28. labels: ${{ steps.meta.outputs.labels }}