Skip to content

Bump serde from 1.0.216 to 1.0.217 #4

Bump serde from 1.0.216 to 1.0.217

Bump serde from 1.0.216 to 1.0.217 #4

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
inputs:
environment:
description: Target environment for deployment
required: true
type: choice
options:
- rubik
jobs:
build:
runs-on: ubuntu-20.04 # matching rubik
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
- uses: actions/upload-artifact@v4
with:
name: lila-ip2proxy
path: target/release/lila-ip2proxy
deploy:
runs-on: ubuntu-latest
environment:
name: ${{ inputs.environment }}
concurrency:
group: ${{ inputs.environment }}
needs: build
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/download-artifact@v4
with:
name: lila-ip2proxy
- name: Configure SSH
run: |
mkdir -p ~/.ssh
touch ~/.ssh/id_deploy
chmod 600 ~/.ssh/id_deploy
echo "$SSH_KEY" > ~/.ssh/id_deploy
echo "$SSH_HOST $SSH_HOST_KEY" > ~/.ssh/known_hosts
cat >>~/.ssh/config <<END
Host deploy-host
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/id_deploy
StrictHostKeyChecking yes
END
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_HOST_KEY: ${{ secrets.SSH_HOST_KEY }}
- name: Deploy via SSH
run: cat lila-ip2proxy | ssh deploy-host "mv /usr/local/bin/lila-ip2proxy /usr/local/bin/lila-ip2proxy.bak && cat - > /usr/local/bin/lila-ip2proxy && chmod +x /usr/local/bin/lila-ip2proxy && systemctl restart lila-ip2proxy"