Skip to content

updated documentation (#617) #2285

updated documentation (#617)

updated documentation (#617) #2285

name: "web-server (HW)"
on: push
# New pushes cancel in-progress builds.
concurrency:
group: ${{ github.workflow }} - ${{ github.job }} - ${{ github.ref }}
cancel-in-progress: true
# Action docs:
#
# - https://github.com/docker/build-push-action#readme
# - https://github.com/docker/login-action#readme
# - https://github.com/docker/metadata-action#readme
# - https://github.com/docker/setup-buildx-action#readme
#
# For the context paths, see:
#
# - Feature request: Allow specifying subdirectory with default git context #460
# https://github.com/docker/build-push-action/issues/460
jobs:
build-stage-web-server-builder:
name: "Builder"
runs-on: ubuntu-latest
steps:
-
uses: docker/setup-buildx-action@v1
-
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: "Build stage: web-server-builder"
uses: docker/build-push-action@v2
with:
context: "https://github.com/${{ github.repository }}.git#${{ github.sha }}:web-server"
target: web-server-builder
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-hw
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-hw,mode=max
build-stage-run-sgx-wallet-server-hw:
name: "Build server (HW)"
runs-on: ubuntu-latest
needs: build-stage-web-server-builder
steps:
-
uses: docker/setup-buildx-action@v1
-
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository_owner }}/sgx-wallet-hw
-
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: "Build stage: run-sgx-wallet-server-hw"
uses: docker/build-push-action@v2
with:
context: "https://github.com/${{ github.repository }}.git#${{ github.sha }}:web-server"
build-args: 'SGX_MODE=HW'
secrets: |
"sgx-signing-key=${{ secrets.SGX_SIGNING_KEY }}"
target: run-sgx-wallet-server-hw
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-hw
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-hw,mode=max
build-stage-run-sgx-wallet-test-hw:
name: "Build tests (HW)"
runs-on: ubuntu-latest
needs: build-stage-web-server-builder
steps:
-
uses: docker/setup-buildx-action@v1
-
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: "Build image: run-sgx-wallet-test-hw (SGX_MODE=HW)"
uses: docker/build-push-action@v2
with:
context: "https://github.com/${{ github.repository }}.git#${{ github.sha }}:web-server"
build-args: 'SGX_MODE=HW'
secrets: |
"sgx-signing-key=${{ secrets.SGX_SIGNING_KEY }}"
target: run-sgx-wallet-test-hw
tags: run-sgx-wallet-test-hw
outputs: type=docker,dest=/tmp/run-sgx-wallet-test-hw.tar
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-hw
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-hw,mode=max
-
uses: actions/upload-artifact@v2
with:
name: run-sgx-wallet-test-hw
path: /tmp/run-sgx-wallet-test-hw.tar