Skip to content

Merge branch 'feat/ci-deb' of https://github.com/SigmaGmbH/swisstroni… #9

Merge branch 'feat/ci-deb' of https://github.com/SigmaGmbH/swisstroni…

Merge branch 'feat/ci-deb' of https://github.com/SigmaGmbH/swisstroni… #9

Workflow file for this run

name: Build Deb
on:
push:
branches: [feat/ci-deb]
jobs:
build-deb:
runs-on: ubuntu-latest
env:
SGX_MODE: HW
VERSION: 1.0.1
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 the version
# id: get_version
# run: |
# echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
# echo "::set-output name=VERSION::$(git rev-parse --short HEAD)"
- name: Build .deb Package Image
uses: docker/build-push-action@v4
with:
file: ./docker/node.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=${{ 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