dev.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. name: Attu Dev Release
  2. on:
  3. pull_request_target:
  4. branches: [main]
  5. types: [closed]
  6. concurrency:
  7. group: attu-dev-release-main
  8. cancel-in-progress: true
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v4
  14. - name: Setup Node.js
  15. uses: actions/setup-node@v4
  16. with:
  17. node-version: 22
  18. - name: Set up Docker Buildx
  19. uses: docker/setup-buildx-action@v3
  20. with:
  21. install: true
  22. - name: Login to DockerHub
  23. uses: docker/login-action@v1
  24. with:
  25. username: ${{ secrets.DOCKER_USERNAME }}
  26. password: ${{ secrets.DOCKER_PWD }}
  27. - name: Docker Build and Push (Multi-platform)
  28. uses: docker/build-push-action@v5
  29. with:
  30. context: .
  31. platforms: linux/amd64
  32. tags: |
  33. zilliz/attu:dev
  34. cache-from: type=registry,ref=zilliz/attu:cache
  35. cache-to: type=inline
  36. build-args: |
  37. VERSION=dev
  38. push: true
  39. tag_issue:
  40. runs-on: ubuntu-latest
  41. needs: build
  42. if: github.event.pull_request.merged == true
  43. steps:
  44. - uses: actions/checkout@v4
  45. - name: Extract Issue Number from PR Body
  46. id: extract_issue
  47. env:
  48. PR_BODY: "${{ github.event.pull_request.body }}"
  49. run: |
  50. echo "ISSUE_NUMBER=$(echo "$PR_BODY" | grep -oP '(?<=#)\d+' | head -n 1)" >> $GITHUB_ENV
  51. - name: Add ready_to_release label to issue
  52. if: env.ISSUE_NUMBER != ''
  53. uses: actions-ecosystem/action-add-labels@v1
  54. with:
  55. github_token: ${{ secrets.PERSONAL_TOKEN }}
  56. labels: ready_to_release
  57. number: ${{ env.ISSUE_NUMBER }}