chore: fix missing params for nosgx build #158
This file contains 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: Build Deb | |
on: | |
push: | |
branches: [ develop, '**-release', 'release-**' ] | |
workflow_dispatch: | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
jobs: | |
build-deb: | |
runs-on: ubuntu-22.04 | |
env: | |
SGX_MODE: HW | |
VERSION: "1.0.5" | |
PRODUCTION_MODE: true | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Retrieve the secret and decode it to a file | |
env: | |
ENCLAVE_PK_BASE64: ${{ secrets.ENCLAVE_PK_BASE64 }} | |
run: | | |
rm sgxvm/Enclave_dev_private.pem || true | |
rm sgxvm/Enclave_private.pem || true | |
echo $ENCLAVE_PK_BASE64 | base64 --decode > sgxvm/Enclave_private.pem | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get version | |
id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Build .deb Package Image | |
uses: docker/build-push-action@v4 | |
with: | |
file: ./docker/deb.Dockerfile | |
context: . | |
load: true | |
tags: deb_build | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-args: | | |
SGX_MODE=HW | |
ENCLAVE_HOME="/usr/lib/" | |
PRODUCTION_MODE=true | |
target: build-deb | |
- name: Run .deb Package Image | |
run: | | |
docker run -e VERSION=${{ env.VERSION }} -v $GITHUB_WORKSPACE/build:/build deb_build | |
cp build/swisstronik_${{ env.VERSION }}_amd64.deb swisstronik_${{ env.VERSION }}_amd64.deb | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: swisstronik_${{ env.VERSION }}_amd64.deb | |
path: swisstronik_${{ env.VERSION }}_amd64.deb |