docker-image.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Docker Image CI
  2. on:
  3. push:
  4. branches: [ master ]
  5. jobs:
  6. build:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - uses: actions/checkout@v2
  10. - name: Build the Docker image
  11. run: mvn clean package -Pdev -DskipTests -U -e && /bin/cp -rf powerjob-server/powerjob-server-starter/target/*.jar powerjob-server/docker/powerjob-server.jar && /bin/cp -rf powerjob-worker-agent/target/*.jar powerjob-worker-agent/powerjob-agent.jar && /bin/cp -rf powerjob-worker-samples/target/*.jar powerjob-worker-samples/powerjob-worker-samples.jar
  12. - uses: docker/build-push-action@v1
  13. with:
  14. username: ${{ secrets.DOCKER_USERNAME }}
  15. password: ${{ secrets.DOCKER_PASSWORD }}
  16. repository: tjqq/powerjob-server
  17. tag_with_ref: true
  18. tags: latest
  19. path: powerjob-server/docker/
  20. - uses: docker/build-push-action@v1
  21. with:
  22. username: ${{ secrets.DOCKER_USERNAME }}
  23. password: ${{ secrets.DOCKER_PASSWORD }}
  24. repository: tjqq/powerjob-agent
  25. tag_with_ref: true
  26. tags: latest
  27. path: powerjob-worker-agent/
  28. - uses: docker/build-push-action@v1
  29. with:
  30. username: ${{ secrets.DOCKER_USERNAME }}
  31. password: ${{ secrets.DOCKER_PASSWORD }}
  32. repository: tjqq/powerjob-worker-samples
  33. tag_with_ref: true
  34. tags: latest
  35. path: powerjob-worker-samples/