build: fix gitea actions
This commit is contained in:
@@ -6,8 +6,17 @@ on:
|
||||
- master
|
||||
jobs:
|
||||
tests:
|
||||
uses: ./.gitea/workflows/test.yaml # use the callable tests job to run tests
|
||||
secrets: inherit
|
||||
name: tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout.git@v4
|
||||
- name: tests
|
||||
uses: nanobyte-public/rust-action@master
|
||||
with:
|
||||
args: |
|
||||
CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo clippy -- -Dwarnings && \
|
||||
CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo clippy --tests -- -Dwarnings && \
|
||||
CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo test
|
||||
deploy:
|
||||
name: deploy
|
||||
runs-on: ubuntu-latest
|
||||
@@ -27,5 +36,5 @@ jobs:
|
||||
run: echo "::set-output name=short_hash::$(git rev-parse --short HEAD)"
|
||||
- name: Build and push docker
|
||||
run: |
|
||||
docker build . -t git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/ovlach_backend:${{steps.git.outputs.short_hash}} --build-arg GITEA_TOKEN="Bearer ${{secrets.DEPLOYMENT_PACKAGE}}" && \
|
||||
docker push git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/ovlach_backend:${{steps.git.outputs.short_hash}}
|
||||
docker build . -t git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/ovlach_frontend:${{steps.git.outputs.short_hash}} --build-arg GITEA_TOKEN="Bearer ${{secrets.DEPLOYMENT_PACKAGE}}" && \
|
||||
docker push git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/ovlach_frontend:${{steps.git.outputs.short_hash}}
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
name: test
|
||||
run-name: test
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
DEPLOYMENT_PACKAGE:
|
||||
description: 'needed for checkout depenediencies'
|
||||
required: true
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
@@ -29,7 +24,7 @@ jobs:
|
||||
restore-keys: ${{github.repository}}-cache-cargo-clippy-v4
|
||||
- uses: nanobyte-public/rust-action@master
|
||||
with:
|
||||
args: CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.DEPLOYMENT_PACKAGE}}\" cargo clippy -- -Dwarnings
|
||||
args: CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo clippy -- -Dwarnings
|
||||
- uses: https://gitea.com/wolfogre/cache/save@v3
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
@@ -57,7 +52,7 @@ jobs:
|
||||
- uses: nanobyte-public/rust-action@master
|
||||
with:
|
||||
args: |
|
||||
CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.DEPLOYMENT_PACKAGE}}\" cargo test
|
||||
CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo test
|
||||
- uses: https://gitea.com/wolfogre/cache/save@v3
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user