Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/beat-forge/api
Browse files Browse the repository at this point in the history
  • Loading branch information
sargon64 committed Jul 27, 2023
2 parents ef9b2b2 + dcb7b84 commit dca0aea
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,48 @@ jobs:
build_and_test:
name: beatforge_api
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2

- name: Configure sccache
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
# cache dependencies
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

# login to ghcr.io
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2

# install rust
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

# test and build
- uses: actions-rs/cargo@v1
with:
command: test
args: --all --release

- uses: actions-rs/cargo@v1
with:
command: build
Expand All @@ -32,8 +59,9 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/beatforge/beatforge_api:latest
tags: ghcr.io/beat-forge/api:latest

- uses: actions/upload-artifact@v2
with:
name: beatforge_api
path: target/release/
path: target/release/

0 comments on commit dca0aea

Please sign in to comment.