new_release #86
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Trigger all release processes | |
on: | |
repository_dispatch: | |
types: | |
- new_release | |
workflow_dispatch: | |
inputs: | |
tag: | |
required: true | |
type: string | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.prepare.outputs.tag }} | |
steps: | |
- id: prepare | |
name: Pass the right tag depending on the event | |
run: | | |
event=${{ github.event_name }} | |
if [[ $event == "workflow_dispatch" ]]; then | |
tag=${{ inputs.tag }} | |
if [[ -z $tag ]]; then | |
tag=$(curl -s https://releases.rocket.chat/stable/info | jq .tag -r) | |
fi | |
else | |
tag=${{ github.event.client_payload.tag }} | |
fi | |
echo "tag: $tag" | |
[[ -n "$tag" ]] && echo "tag=$tag" >>$GITHUB_OUTPUT # else intentional fail | |
snap-run: | |
needs: | |
- prepare | |
uses: "RocketChat/server-snap/.github/workflows/main.yml@develop" | |
with: | |
tag: ${{ needs.prepare.outputs.tag }} | |
secrets: | |
snapcraft-credential: ${{ secrets.SNAPCRAFT_CREDENTIAL }} | |
github-token: ${{ secrets.GH_PERSONAL_TOKEN }} | |
packer-run: | |
if: '! contains(needs.prepare.outputs.tag, ''rc'')' | |
needs: | |
- prepare | |
uses: "RocketChat/rocketchat-packer/.github/workflows/build_images.yml@main" | |
with: | |
tag: ${{ needs.prepare.outputs.tag }} | |
secrets: | |
aws-key-id: ${{ secrets.AWS_KEY_ID }} | |
aws-secret-key: ${{ secrets.AWS_SECRET_KEY }} | |
digitalocean-token: ${{ secrets.DIGITALOCEAN_TOKEN }} | |
github-token: ${{ secrets.GH_PERSONAL_TOKEN }} | |
helm-run: | |
needs: | |
- prepare | |
uses: "RocketChat/helm-charts/.github/workflows/main.yml@master" | |
with: | |
tag: ${{ needs.prepare.outputs.tag }} | |
secrets: | |
github-token: ${{ secrets.GH_PERSONAL_TOKEN }} | |
docker-run: | |
needs: | |
- prepare | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Clone tests repository' | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Download compose file | |
run: curl -LO https://go.rocket.chat/i/docker-compose.yml | |
- name: Run tests | |
shell: bash | |
env: | |
ROCKETCHAT_TAG: ${{ needs.prepare.outputs.tag }} | |
COMPOSE_FILE: ${{ github.workspace }}/docker-compose.yml | |
run: | | |
sudo apt-get --no-install-recommends install jo jq -y | |
bash ./run_docker.bash |