Skip to content

Support staging attestation (#85) #36

Support staging attestation (#85)

Support staging attestation (#85) #36

on:
push:
branches:
- main
jobs:
clippy_check_cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-hub/docker/cli@f5fdbfc3f9d2a9265ead8962c1314108a7b7ec5d
env:
SKIP_LOGIN: true
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-09-13
override: true
components: rustfmt, clippy
- name: Compile project
run: cargo build --all-features -p ev-enclave -Z registry-auth
env:
CARGO_REGISTRIES_EVERVAULT_RUST_LIBRARIES_INDEX: ${{ secrets.RUST_CRYPTO_REGISTRY }}
CARGO_REGISTRIES_EVERVAULT_RUST_LIBRARIES_TOKEN: ${{ secrets.CARGO_REGISTRIES_EVERVAULT_RUST_LIBRARIES_TOKEN }}
- name: Test project
run: cargo test -p ev-enclave
env:
CARGO_REGISTRIES_EVERVAULT_RUST_LIBRARIES_INDEX: ${{ secrets.RUST_CRYPTO_REGISTRY }}
- name: Format project
run: cargo fmt --check
env:
CARGO_REGISTRIES_EVERVAULT_RUST_LIBRARIES_INDEX: ${{ secrets.RUST_CRYPTO_REGISTRY }}
- name: Lint project
run: cargo clippy
env:
CARGO_REGISTRIES_EVERVAULT_RUST_LIBRARIES_INDEX: ${{ secrets.RUST_CRYPTO_REGISTRY }}
get-version:
needs: [clippy_check_cli]
runs-on: ubuntu-latest
outputs:
full_version: ${{ steps.get-full-version.outputs.full_version }}
steps:
- uses: actions/checkout@v4
- id: get-full-version
run: |
echo "using sha tag ${GITHUB_SHA::6}"
echo ::set-output name=full_version::1.0.0-${GITHUB_SHA::6}
build-and-deploy:
needs: [get-version]
uses: ./.github/workflows/build-and-publish.yml
with:
stage: 'staging'
major-version: '1'
full-version: "${{ needs.get-version.outputs.full_version }}"
ev-domain: 'evervault.io'
secrets:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_STAGING }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGING }}
aws-cloudfront-distribution-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_STAGING }}
evervault-rust-lib-index: ${{ secrets.RUST_CRYPTO_REGISTRY }}
evervault-rust-lib-token: ${{ secrets.CARGO_REGISTRIES_EVERVAULT_RUST_LIBRARIES_TOKEN }}