diff --git a/.github/workflows/force_release.yaml b/.github/workflows/force_release.yaml index 54e14b0..5f8388c 100644 --- a/.github/workflows/force_release.yaml +++ b/.github/workflows/force_release.yaml @@ -12,7 +12,7 @@ jobs: with: ref: ${{ github.ref_name }} path: server-snap - + - name: Set variables id: prepare working-directory: server-snap @@ -34,11 +34,11 @@ jobs: id: snap-build with: path: server-snap - + - name: 'Clone tests repository' uses: actions/checkout@v3 with: - repository: debdutdeb/rocket.chat.tests + repository: RocketChat/public-releases submodules: true path: tests diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6dca7e9..9de444a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,12 +11,34 @@ on: required: true github-token: required: true + workflow_dispatch: + # this trigger uses existing version for release jobs: + prereqs: + runs-on: ubuntu-latest + outputs: + version: ${{ steps._id.outputs.version }} + steps: + - shell: bash + id: _id + run: | + tag= + if [[ "${{ github.event_name }}" == 'workflow_dispatch' ]]; then + tag="$(awk -F: '/^version:/ snap/snapcraft.yaml {print $2}' | tr -d '[:space:]')" + else + tag="${{inputs.tag}}" + fi + + echo "tag: $tag" + echo "version=$tag" >> $GITHUB_OUTPUT + + build-and-test: + needs: [ prereqs ] uses: RocketChat/server-snap/.github/workflows/test.yml@develop with: - tag: ${{ inputs.tag }} + tag: ${{ needs.prereqs.outputs.version }} release: if: '! contains(inputs.tag, ''rc'')'