docker.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. name: Release 3X-UI for Docker
  2. on:
  3. push:
  4. tags:
  5. - "*"
  6. workflow_dispatch:
  7. jobs:
  8. build_and_push:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Check out the code
  12. uses: actions/checkout@v4
  13. - name: Set up QEMU
  14. uses: docker/setup-qemu-action@v3
  15. - name: Set up Docker Buildx
  16. uses: docker/setup-buildx-action@v3
  17. - name: Login to GHCR
  18. uses: docker/login-action@v3
  19. with:
  20. registry: ghcr.io
  21. username: ${{ github.actor }}
  22. password: ${{ secrets.GITHUB_TOKEN }}
  23. - name: Docker meta
  24. id: meta
  25. uses: docker/metadata-action@v5
  26. with:
  27. images: ghcr.io/${{ github.repository }}
  28. - name: Build and push Docker image
  29. uses: docker/build-push-action@v6
  30. with:
  31. context: .
  32. push: ${{ github.event_name != 'pull_request' }}
  33. platforms: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6, linux/386
  34. tags: ${{ steps.meta.outputs.tags }}
  35. labels: ${{ steps.meta.outputs.labels }}