Skip to content

fix(deps): update rust crate uuid to v1 #51

fix(deps): update rust crate uuid to v1

fix(deps): update rust crate uuid to v1 #51

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
name: Build and Deploy to Staging
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: set up cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build
run: cargo build --release
- name: Test
run: cargo test --release
- name: Login to GitHub Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
tags: ghcr.io/${{ github.repository }}:nightly
push: ${{ github.event_name == 'push' }}
file: ./Dockerfile
context: .
- name: Deploy to Staging
uses: appleboy/[email protected]
if: github.event_name == 'push'
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once