dashboard_push_docker_hub.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: Push apisix dashboard to Docker image
  2. on:
  3. push:
  4. branches: ['release/apisix-dashboard**']
  5. jobs:
  6. build:
  7. strategy:
  8. fail-fast: false
  9. matrix:
  10. os:
  11. - centos
  12. - alpine
  13. name: build dashboard & test on ${{ matrix.os }} && push to docker hub
  14. runs-on: ubuntu-latest
  15. env:
  16. APISIX_DASHBOARD_TAG: "2.14.0"
  17. steps:
  18. - name: Check out the repo
  19. uses: actions/checkout@v2
  20. - name: Build and run
  21. run: |
  22. make build-dashboard-${{ matrix.os }}
  23. docker-compose -f ./compose/dashboard-compose.yaml up -d
  24. sleep 30
  25. docker logs compose_dashboard_1
  26. - name: check
  27. run: |
  28. wget https://raw.githubusercontent.com/apache/apisix-dashboard/master/api/test/shell/manager_smoking.sh
  29. chmod +x ./manager_smoking.sh
  30. sh manager_smoking.sh -s true
  31. - name: Tar Image
  32. run: |
  33. make save-dashboard-${{ matrix.os }}-tar
  34. - name: Upload Image
  35. uses: actions/upload-artifact@v2
  36. with:
  37. path: ./package
  38. - name: Login to Docker Hub
  39. uses: docker/login-action@v1
  40. with:
  41. username: ${{ secrets.DOCKERHUB_USER }}
  42. password: ${{ secrets.DOCKERHUB_TOKEN }}
  43. - name: Set up QEMU
  44. uses: docker/setup-qemu-action@v1
  45. - name: Set up Docker Buildx
  46. uses: docker/setup-buildx-action@v1
  47. - name: Push apisix dashboard image to Docker Hub
  48. if: matrix.os == 'centos'
  49. run: |
  50. make push-multiarch-dashboard