artifacts.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: Publish Artifacts
  2. env:
  3. GO_VERSION: 1.18.4
  4. on:
  5. issue_comment:
  6. types: [created]
  7. jobs:
  8. publish-artifacts:
  9. if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/generate-artifacts')
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout code into the Go module directory
  13. uses: actions/checkout@v3
  14. - name: Set up Go ${{ env.GO_VERSION }}
  15. uses: actions/setup-go@v3
  16. with:
  17. go-version: ${{ env.GO_VERSION }}
  18. cache: true
  19. - name: Build cross platform compose-plugin binaries
  20. run: make -f builder.Makefile cross
  21. - name: Upload macos-amd64 binary
  22. uses: actions/upload-artifact@v3
  23. with:
  24. name: docker-compose-darwin-amd64
  25. path: ${{ github.workspace }}/bin/docker-compose-darwin-amd64
  26. - name: Upload macos-arm64 binary
  27. uses: actions/upload-artifact@v3
  28. with:
  29. name: docker-compose-darwin-arm64
  30. path: ${{ github.workspace }}/bin/docker-compose-darwin-arm64
  31. - name: Upload linux-amd64 binary
  32. uses: actions/upload-artifact@v3
  33. with:
  34. name: docker-compose-linux-amd64
  35. path: ${{ github.workspace }}/bin/docker-compose-linux-amd64
  36. - name: Upload linux-ppc64le binary
  37. uses: actions/upload-artifact@v3
  38. with:
  39. name: docker-compose-linux-ppc64le
  40. path: ${{ github.workspace }}/bin/docker-compose-linux-ppc64le
  41. - name: Upload windows-amd64 binary
  42. uses: actions/upload-artifact@v3
  43. with:
  44. name: docker-compose-windows-amd64.exe
  45. path: ${{ github.workspace }}/bin/docker-compose-windows-amd64.exe
  46. - name: Update comment
  47. uses: peter-evans/create-or-update-comment@v1
  48. with:
  49. comment-id: ${{ github.event.comment.id }}
  50. body: |
  51. This PR can be tested using [binaries](https://github.com/docker/compose-cli/actions/runs/${{ github.run_id }}).
  52. reactions: eyes