25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

38 lines
1.2 KiB

  1. on: ['pull_request']
  2. name: Build & Validate Image
  3. jobs:
  4. build:
  5. name: Build & Validate Image
  6. runs-on: self-hosted
  7. timeout-minutes: 2880
  8. env:
  9. working-directory: ./builder
  10. steps:
  11. - name: Clean project
  12. id: clean
  13. working-directory: ${{ env.working-directory }}
  14. run: |
  15. sudo rm -fr work deploy
  16. - name: Checkout code
  17. uses: actions/checkout@v2
  18. - name: Build project
  19. id: builder
  20. working-directory: ${{ env.working-directory }}
  21. run: |
  22. sudo bash build.sh
  23. echo ::set-output name=filename::$(ls deploy/*.tar.xz | xargs -n 1 basename)
  24. - name: Fix Permissions
  25. id: fix_perm_filename
  26. run: |
  27. chmod a+rw ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}
  28. echo ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}
  29. - uses: actions/upload-artifact@v1
  30. with:
  31. name: ${{ steps.builder.outputs.filename }}
  32. path: ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}
  33. - name: Delete Image
  34. id: delete_image
  35. run: |
  36. rm ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}