diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 206cf28e5e..7bba42693b 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -5,6 +5,12 @@ on: branches: - 'v1.10' - 'v1.11' + workflow_dispatch: + inputs: + ref: + description: 'Branch, tag, or SHA to build tarball from' + required: true + type: string jobs: source: @@ -19,6 +25,7 @@ jobs: uses: actions/checkout@v6 with: path: 'code' + ref: ${{ inputs.ref || github.ref }} - name: Checkout reusable actions uses: actions/checkout@v6 @@ -71,6 +78,7 @@ jobs: tar -tvzf source_archives.tar.gz - name: Upload source tarball to remote host + if: github.event_name != 'workflow_dispatch' uses: ./actions/.github/actions/teleport with: EXEC_COMMANDS_PRE: 'mkdir -p /var/www/freeswitch/public/release/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}' @@ -81,3 +89,10 @@ jobs: PROXY_URL: ${{ secrets.PROXY_URL }} TOKEN: ${{ secrets.TELEPORT_TOKEN }} USERNAME: ${{ secrets.USERNAME }} + + - name: Upload source tarball as artifact + if: github.event_name == 'workflow_dispatch' + uses: actions/upload-artifact@v7 + with: + name: source_archives + path: source_archives.tar.gz