No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

44 líneas
1.4 KiB

  1. on: ['push']
  2. name: Build & Validate Image
  3. jobs:
  4. build:
  5. name: Build & Validate Image
  6. runs-on: arm64
  7. timeout-minutes: 2880
  8. env:
  9. working-directory: ./
  10. steps:
  11. - name: Checkout code
  12. uses: actions/checkout@v2
  13. - name: Clean docker
  14. id: clean_docker
  15. working-directory: ${{ env.working-directory }}
  16. run: |
  17. docker system prune -af
  18. docker system prune --volumes -f
  19. docker image prune -af
  20. docker container stop $(docker container ls -aq) || true
  21. docker container rm $(docker container ls -aq) || true
  22. - name: Build project
  23. id: builder
  24. working-directory: ${{ env.working-directory }}
  25. run: |
  26. make build
  27. make run arch=arm64
  28. echo ::set-output name=filename::$(ls deploy/*.img.xz | xargs -n 1 basename)
  29. - name: Fix Permissions
  30. id: fix_perm_filename
  31. run: |
  32. chmod a+rw ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}
  33. echo ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}
  34. - uses: actions/upload-artifact@v1
  35. with:
  36. name: ${{ steps.builder.outputs.filename }}
  37. path: ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}
  38. - name: Delete Image
  39. id: delete_image
  40. run: |
  41. rm ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}