Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

release.yml 1.7 KiB

4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. on:
  2. push:
  3. tags:
  4. - 'v*'
  5. name: Build & Deploy Image
  6. jobs:
  7. build:
  8. name: Build & Release Image
  9. runs-on: self-hosted
  10. timeout-minutes: 2880
  11. env:
  12. working-directory: ./builder
  13. steps:
  14. - name: Checkout code
  15. uses: actions/checkout@v2
  16. - name: Build project
  17. id: builder
  18. working-directory: ${{ env.working-directory }}
  19. env:
  20. CONTINUE: 1
  21. run: |
  22. bash build-docker.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. - name: Create Release
  30. id: create_release
  31. uses: actions/create-release@v1
  32. env:
  33. GITHUB_TOKEN: ${{ secrets.LONG_TOKEN }}
  34. with:
  35. tag_name: ${{ github.ref }}
  36. release_name: Release ${{ github.ref }}
  37. draft: false
  38. prerelease: false
  39. - name: Upload Release Asset
  40. id: upload-release-asset
  41. uses: actions/upload-release-asset@v1
  42. env:
  43. GITHUB_TOKEN: ${{ secrets.LONG_TOKEN }}
  44. with:
  45. upload_url: ${{ steps.create_release.outputs.upload_url }}
  46. asset_path: ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}
  47. asset_name: ${{ steps.builder.outputs.filename }}
  48. asset_content_type: application/x-tar
  49. - name: Delete Image
  50. id: delete_image
  51. run: |
  52. rm ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}