Build deb on push for this branch (temp), use SGX 2.23 on Ubuntu 20.0… #23
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: [ feat/x-compliance ] | |
jobs: | |
build-deb: | |
runs-on: ubuntu-20.04 | |
env: | |
SGX_MODE: HW | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- 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/" | |
target: build-deb | |
- name: Run .deb Package Image | |
run: | | |
docker run -e VERSION=${{ steps.get_version.outputs.version-without-v }} -v $GITHUB_WORKSPACE/build:/build deb_build | |
cp build/swisstronik_${{ steps.get_version.outputs.version-without-v }}_amd64.deb swisstronik_${{ steps.get_version.outputs.version-without-v }}_amd64.deb | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: swisstronik_${{ steps.get_version.outputs.version-without-v }}_amd64.deb | |
path: swisstronik_${{ steps.get_version.outputs.version-without-v }}_amd64.deb |