docker-image.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: ci
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. logLevel:
  6. description: 'Log level'
  7. required: true
  8. default: 'warning'
  9. release:
  10. types: [published]
  11. jobs:
  12. docker:
  13. runs-on: ubuntu-latest
  14. steps:
  15. -
  16. name: Checkout repo
  17. uses: actions/checkout@v2
  18. -
  19. name: Set up QEMU
  20. uses: docker/setup-qemu-action@v1
  21. -
  22. name: Set up Docker Buildx
  23. uses: docker/setup-buildx-action@v1
  24. -
  25. name: Login to DockerHub
  26. uses: docker/login-action@v1
  27. with:
  28. username: mantissoftware
  29. password: ${{ secrets.DOCKER_REPO }}
  30. - name: Extract metadata (tags, labels) for Docker
  31. id: meta
  32. uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
  33. with:
  34. images: |
  35. mantissoftware/python36-runner
  36. -
  37. name: Build and push
  38. id: docker_build
  39. uses: docker/build-push-action@v2
  40. with:
  41. push: true
  42. tags: ${{ steps.meta.outputs.tags }}
  43. labels: ${{ steps.meta.outputs.labels }}
  44. -
  45. name: Image digest
  46. run: echo ${{ steps.docker_build.outputs.digest }}
  47. -
  48. name: Push Readme to Docker Hub
  49. uses: peter-evans/dockerhub-description@v2
  50. with:
  51. username: mantissoftware
  52. password: ${{ secrets.DOCKERHUB_PASS }}
  53. repository: mantissoftware/python36-runner