-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (78 loc) · 2.36 KB
/
trigger_releases.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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