|
| 1 | +name: 🚀 Manual build - Enterprise |
| 2 | + |
| 3 | +on: |
| 4 | + # Manual trigger build |
| 5 | + # No multi-select |
| 6 | + # https://github.com/actions/runner/issues/2076 |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + build_docker: |
| 10 | + description: Build Docker |
| 11 | + type: boolean |
| 12 | + required: false |
| 13 | + |
| 14 | + build_windows_x64: |
| 15 | + description: Build Windows x64 |
| 16 | + type: boolean |
| 17 | + required: false |
| 18 | + |
| 19 | + build_macos_x64: |
| 20 | + description: Build macOS x64 |
| 21 | + type: boolean |
| 22 | + required: false |
| 23 | + |
| 24 | + build_macos_arm64: |
| 25 | + description: Build macOS arm64 |
| 26 | + type: boolean |
| 27 | + required: false |
| 28 | + |
| 29 | + build_linux_appimage_x64: |
| 30 | + description: Build Linux AppImage x64 |
| 31 | + type: boolean |
| 32 | + required: false |
| 33 | + |
| 34 | + build_linux_deb_x64: |
| 35 | + description: Build Linux deb x64 |
| 36 | + type: boolean |
| 37 | + required: false |
| 38 | + |
| 39 | + environment: |
| 40 | + description: Environment to run build |
| 41 | + type: environment |
| 42 | + default: 'development' |
| 43 | + required: false |
| 44 | + |
| 45 | + debug: |
| 46 | + description: Enable SSH Debug |
| 47 | + type: boolean |
| 48 | + |
| 49 | +# Cancel a previous same workflow |
| 50 | +concurrency: |
| 51 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 52 | + cancel-in-progress: true |
| 53 | + |
| 54 | +jobs: |
| 55 | + get-selected: |
| 56 | + runs-on: ubuntu-latest |
| 57 | + outputs: # Set this to consume the output on other job |
| 58 | + selected: ${{ steps.get-selected.outputs.selected}} |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v4 |
| 61 | + |
| 62 | + - id: get-selected |
| 63 | + uses: joao-zanutto/[email protected] |
| 64 | + with: |
| 65 | + format: 'list' |
| 66 | + |
| 67 | + - name: echo selected targets |
| 68 | + run: echo ${{ steps.get-selected.outputs.selected }} |
| 69 | + |
| 70 | + manual-build: |
| 71 | + needs: get-selected |
| 72 | + uses: ./.github/workflows/build.yml |
| 73 | + secrets: inherit |
| 74 | + with: |
| 75 | + target: ${{ needs.get-selected.outputs.selected }} |
| 76 | + debug: ${{ inputs.debug }} |
| 77 | + environment: ${{ inputs.environment }} |
| 78 | + enterprise: true |
| 79 | + |
| 80 | + aws-upload: |
| 81 | + uses: ./.github/workflows/aws-upload-dev.yml |
| 82 | + secrets: inherit |
| 83 | + needs: [manual-build] |
| 84 | + if: always() |
| 85 | + |
| 86 | + clean: |
| 87 | + uses: ./.github/workflows/clean-deployments.yml |
| 88 | + # secrets: inherit |
| 89 | + needs: [aws-upload] |
| 90 | + if: always() |
| 91 | + |
| 92 | + # Remove artifacts from github actions |
| 93 | + remove-artifacts: |
| 94 | + name: Remove artifacts |
| 95 | + needs: [aws-upload] |
| 96 | + if: always() |
| 97 | + runs-on: ubuntu-latest |
| 98 | + |
| 99 | + steps: |
| 100 | + - uses: actions/checkout@v4 |
| 101 | + - name: Remove all artifacts |
| 102 | + uses: ./.github/actions/remove-artifacts |
| 103 | + |
| 104 | + |
0 commit comments