Skip to content

Commit

Permalink
Being able to pick LavinMQ version
Browse files Browse the repository at this point in the history
  • Loading branch information
dentarg committed Oct 10, 2024
1 parent c777b34 commit a662100
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
version: [ latest ]
include:
- { os: ubuntu-24.04, version: '1.3.1' }

name: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.version }})
runs-on: ${{ matrix.os }}
continue-on-error: true # prevent the workflow to fail if this job fails
steps:
Expand All @@ -22,9 +25,15 @@ jobs:
- run: sudo apt-get update
shell: bash
continue-on-error: true
- run: sudo apt install lavinmq
- name: "Install LavinMQ (${{ matrix.version }})"
run: |
if test "${{ matrix.version }}" = "latest";
then
sudo apt install lavinmq
else
sudo apt install "lavinmq=${{ matrix.version }}-1"
fi
shell: bash
continue-on-error: true
- run: sudo ls -al /etc/lavinmq
shell: bash
continue-on-error: true
Expand All @@ -36,4 +45,4 @@ jobs:
continue-on-error: true
- run: sudo systemctl status lavinmq.service
shell: bash
continue-on-error: true
continue-on-error: true
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
version: [ latest ]
include:
- { os: ubuntu-24.04, version: '1.3.1' }

name: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.version }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
version: ${{ matrix.version }}
- uses: ./
- run: lavinmq --version
- run: systemctl is-active lavinmq.service
Expand Down
15 changes: 13 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
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:
Expand All @@ -20,11 +24,18 @@ runs:
- run: sudo apt-get update
shell: bash

- run: sudo apt install lavinmq
- name: "Install LavinMQ (${{ inputs.version }})"
run: |
if test "${{ inputs.version }}" = "latest";
then
sudo apt install lavinmq
else
sudo apt 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
shell: bash

0 comments on commit a662100

Please sign in to comment.