feat: add Dependabot auto-merge workflow to streamline pull request h… #163
This file contains hidden or 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
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: write | |
checks: write | |
pull-requests: write | |
env: | |
CARGO_TERM_COLOR: always | |
SQLX_OFFLINE: true | |
LC_ALL: en_US.UTF-8 | |
LANG: en_US.UTF-8 | |
LANGUAGE: en_US | |
CARGO_HOME: ${{ github.workspace }}/.cargo | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Just | |
uses: extractions/setup-just@v2 | |
- name: Add Cargo bin to PATH | |
run: echo "${{ github.workspace }}/.cargo/bin" >> $GITHUB_PATH | |
- name: Cache Cargo | |
uses: actions/cache@v4 | |
with: | |
path: | | |
/usr/local/cargo | |
/usr/local/rustup | |
${{ env.CARGO_HOME }}/bin | |
${{ env.CARGO_HOME }}/git | |
${{ env.CARGO_HOME }}/registry | |
${{ env.CARGO_HOME }}/.crates2.json | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cache Dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: Create .env file | |
run: cp .env.template .env | |
- name: Setup | |
run: just install | |
- name: Build | |
run: just build | |
- name: Test | |
run: just test | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: rustygpt-web/dist/ | |
retention-days: 7 |