feat: moving away from juniper and sea-orm #250
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- 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@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
tags: ghcr.io/${{ github.repository }}:nightly | |
push: ${{ github.event_name == 'push' }} | |
file: ./Dockerfile | |
context: . | |
# deployment frozen for now | |
# - 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 |