Skip to content

Merge pull request #120 from ineiti/websocket_reconnection #219

Merge pull request #120 from ineiti/websocket_reconnection

Merge pull request #120 from ineiti/websocket_reconnection #219

Workflow file for this run

name: Docker Build
on:
push:
branches:
- main
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up cargo cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
target-common
.devbox
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-docker-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
cargo-docker
cargo-build
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.11.0
with:
enable-cache: 'true'
- name: Update build tag
run: devbox run -- make update_version
- name: Build servers
run: devbox run -- make build_cli_release build_web_release
- name: Docker build signal
uses: mr-smithers-excellent/docker-build-push@v5
with:
image: fledgre/flsignal
registry: docker.io
dockerfile: Dockerfile.flsignal
username: ${{ secrets.DOCKERHUB_NAME }}
password: ${{ secrets.DOCKERHUB }}
tags: latest
- name: Docker build fledger
uses: mr-smithers-excellent/docker-build-push@v5
with:
image: fledgre/fledger
registry: docker.io
dockerfile: Dockerfile.fledger
username: ${{ secrets.DOCKERHUB_NAME }}
password: ${{ secrets.DOCKERHUB }}
tags: latest
- name: Docker build web
uses: mr-smithers-excellent/docker-build-push@v5
with:
image: fledgre/web
registry: docker.io
dockerfile: Dockerfile.web
username: ${{ secrets.DOCKERHUB_NAME }}
password: ${{ secrets.DOCKERHUB }}
tags: latest
publish_crate:
runs-on: ubuntu-latest
needs: docker
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.11.0
with:
enable-cache: 'true'
- name: Publish new crates, if any
run: devbox run -- make publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
deploy:
runs-on: ubuntu-latest
needs: docker
steps:
- name: Update signal.fledg.re
uses: appleboy/ssh-action@master
with:
host: signal.fledg.re
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
docker-compose pull -q
docker-compose down
docker-compose up -d