-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
41 lines (36 loc) · 1.15 KB
/
action.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
name: "LavinMQ in GitHub Actions VM"
description: "Start LavinMQ in the GitHub Actions VM"
branding:
icon: "save"
color: "orange"
inputs:
env-key:
description: "Name of the environment variable with the LavinMQ URL"
required: false
default: "AMQP_URL"
version:
description: "The version of LavinMQ to install"
required: false
default: "latest"
runs:
using: "composite"
steps:
- run: curl -L https://packagecloud.io/cloudamqp/lavinmq/gpgkey | sudo apt-key add -
shell: bash
- run: echo "deb https://packagecloud.io/cloudamqp/lavinmq/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/lavinmq.list
shell: bash
- run: sudo apt-get update
shell: bash
- name: "Install LavinMQ (${{ inputs.version }})"
run: |
if test "${{ inputs.version }}" = "latest";
then
sudo apt-get install lavinmq
else
sudo apt-get install "lavinmq=${{ inputs.version }}-1"
fi
shell: bash
- run: sudo systemctl start lavinmq.service
shell: bash
- run: echo "${{ inputs.env-key }}=amqp://guest:guest@localhost" >> $GITHUB_ENV
shell: bash