Skip to content

Commit

Permalink
chore(ci): update deployment workflow and script
Browse files Browse the repository at this point in the history
  • Loading branch information
damonto committed May 29, 2024
1 parent 39a1d6d commit 3aed8fb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ on:
branches: ['v*.*.*']

jobs:
prepare-matrix:
name: Prepare Matrix
extract-servers:
name: Extract Servers
runs-on: ubuntu-latest
outputs:
servers: ${{ steps.create-matrix.outputs.matrix }}
servers: ${{ steps.extract.outputs.matrix }}
steps:
- name: Create Matrix Variable
id: create-matrix
- name: Extract servers from vars.SSH_SERVER_LIST
id: extract
run: echo "matrix=$(echo '${{ vars.SSH_SERVER_LIST }}' | jq -c .)" >> $GITHUB_OUTPUT

deploy:
name: Deploy to ${{ matrix.server.name }}
runs-on: ubuntu-latest
needs: [prepare-matrix]
needs: [extract-servers]
strategy:
matrix:
server: ${{ fromJSON(needs.prepare-matrix.outputs.servers) }}
server: ${{ fromJSON(needs.extract-servers.outputs.servers) }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
7 changes: 6 additions & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ if [ ! -x "$(command -v systemctl)" ] && [ ! -x "$(command -v supervisorctl)" ];
exit 1
fi

# Check if the system is Debian 11 (bullseye)
if [ "$(lsb_release -cs)" == "bullseye" ]; then
echo "deb http://deb.debian.org/debian/ sid main" > /etc/apt/sources.list.d/sid.list
fi

# Install dependencies
apt-get update -y && apt-get install -y unzip cmake pkg-config libcurl4-openssl-dev libpcsclite-dev zip curl
apt-get update -y && apt-get install -y unzip cmake pkg-config libcurl4-openssl-dev libpcsclite-dev zip curl libc6

# Get the latest release version
get_latest_release() {
Expand Down

0 comments on commit 3aed8fb

Please sign in to comment.