fix: prevent db connection from dropping on auth #57
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] | |
name: Build and Test | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
jobs: | |
build: | |
name: Build and Publish | |
runs-on: self-hosted | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
# cache with sccache | |
- name: Cache | |
uses: | |
mozilla-actions/[email protected] | |
# login to ghcr.io | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# install rust | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
# test and build | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all --release | |
# publish to ghcr.io and publish artifact | |
- uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ghcr.io/beat-forge/api:latest | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: api-linux-amd64 | |
path: target/release/gql-api |