Skip to content

Commit

Permalink
Fetch sentry secrets from vault when building, remove time consuming …
Browse files Browse the repository at this point in the history
…steps in build (#49)

…checks from build.
  • Loading branch information
Sindrir authored Dec 13, 2024
1 parent 58a9108 commit 5c925df
Showing 1 changed file with 7 additions and 32 deletions.
39 changes: 7 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ jobs:
VAULT_BASE_URL: ${{ secrets.VAULT_BASE_URL }}
VAULT_ROLE_ID: ${{ secrets.VAULT_ROLE_ID }}
VAULT_SECRET_ID: ${{ secrets.VAULT_SECRET_ID }}
SENTRY_ENVIRONMENT: "stage" # TODO set dynamically when we have prod/stage
SENTRY_URL: ${{ secrets.SENTRY_URL }}
VITE_SENTRY_ENVIRONMENT: "stage" # TODO set dynamically when we have prod/stage
VITE_SENTRY_URL: ${{ secrets.SENTRY_URL }}
RUST_BACKTRACE: full
RUST_LOG: debug
ACTIONS_STEP_DEBUG: true
Expand All @@ -50,7 +46,8 @@ jobs:
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: |
kv/team/text/data/artifactory * | ART_
kv/team/text/data/artifactory * | ART_ ;
kv/team/text/trokk-stage * | TROKK_ ;
# Git fix for Windows, workaround for permission issues regarding self-hosted runners
- name: Windows; Git fix
Expand Down Expand Up @@ -82,30 +79,6 @@ jobs:
!src-tauri/target/release/bundle
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Rust; Install cargo-audit
run: cargo install cargo-audit

- name: Rust; Run cargo audit
continue-on-error: true
working-directory: ./src-tauri
run: cargo audit

- name: Rust; Run cargo fmt
working-directory: ./src-tauri
run: cargo fmt --all -- --check

- name: Rust; Run cargo clippy
working-directory: ./src-tauri
run: cargo clippy --all -- -D warnings
env:
VAULT_BASE_URL: "PLACEHOLDER"
VAULT_ROLE_ID: "PLACEHOLDER"
VAULT_SECRET_ID: "PLACEHOLDER"

- name: Rust; Run cargo test
working-directory: ./src-tauri
run: cargo test --all

- name: NPM; Sync node version and setup cache
uses: actions/setup-node@v4
with:
Expand All @@ -119,9 +92,6 @@ jobs:
if: ${{ matrix.windows }}
run: npm install @tauri-apps/[email protected]

- name: NPM; Lint frontend
run: npm run lint

# TODO when tests are set up again
#- name: NPM; Run frontend tests
# run: npm run test
Expand All @@ -148,6 +118,11 @@ jobs:
- name: Tauri build
uses: tauri-apps/tauri-action@v0
env:
VITE_SENTRY_URL: ${{ steps.import-secrets.outputs.TROKK_SENTRY_DSN }}
VITE_SENTRY_ENVIRONMENT: ${{ steps.import-secrets.outputs.TROKK_SENTRY_ENVIRONMENT }}
SENTRY_URL: ${{ steps.import-secrets.outputs.TROKK_SENTRY_DSN }}
SENTRY_ENVIRONMENT: ${{ steps.import-secrets.outputs.TROKK_SENTRY_ENVIRONMENT }}
id: tauri_build

- name: Setup JFrog CLI
Expand Down

0 comments on commit 5c925df

Please sign in to comment.