docker.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: Release 3X-UI for Docker
  2. on:
  3. push:
  4. tags:
  5. - "*"
  6. workflow_dispatch:
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout repository
  12. uses: actions/[email protected]
  13. with:
  14. submodules: true
  15. - name: Docker meta
  16. id: meta
  17. uses: docker/metadata-action@v5
  18. with:
  19. images: |
  20. ghcr.io/mhsanaei/3x-ui
  21. tags: |
  22. type=ref,event=branch
  23. type=ref,event=tag
  24. type=pep440,pattern={{version}}
  25. - name: Set up QEMU
  26. uses: docker/[email protected]
  27. - name: Set up Docker Buildx
  28. uses: docker/[email protected]
  29. - name: Login to GHCR
  30. uses: docker/[email protected]
  31. with:
  32. registry: ghcr.io
  33. username: ${{ github.repository_owner }}
  34. password: ${{ secrets.GITHUB_TOKEN }}
  35. - name: Build and push
  36. uses: docker/[email protected]
  37. with:
  38. context: .
  39. push: true
  40. platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/arm/v6,linux/386
  41. tags: ${{ steps.meta.outputs.tags }}
  42. labels: ${{ steps.meta.outputs.labels }}