mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
00dfff6840
* cleaned up actions and new measure action to generate, sign and upload measurements * improve constellation ip fetching to support multiple control nodes Signed-off-by: Fabian Kammel <fk@edgeless.systems>
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: Build micro service
|
|
description: Build and upload a container image for a Constellation micro-service
|
|
inputs:
|
|
name:
|
|
description: 'Name of the micro-service'
|
|
required: true
|
|
projectVersion:
|
|
description: 'Version of the micro-service'
|
|
default: '0.0.0'
|
|
required: false
|
|
dockerfile:
|
|
description: 'Path to the services Dockerfile'
|
|
required: true
|
|
pushTag:
|
|
description: 'Use this image tag'
|
|
required: false
|
|
githubToken:
|
|
description: 'GitHub authorization token'
|
|
required: true
|
|
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v3
|
|
with:
|
|
images: |
|
|
ghcr.io/${{ github.repository }}/${{ inputs.name }}
|
|
tags: |
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
type=raw,value=${{ inputs.pushTag }},enable=${{ '' != inputs.pushTag }}
|
|
type=ref,event=branch
|
|
|
|
- name: Set up Docker Buildx
|
|
id: docker-setup
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Log in to the Container registry
|
|
id: docker-login
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ inputs.githubToken }}
|
|
|
|
- name: Build and push container image
|
|
id: build-micro-service
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
file: ${{ inputs.dockerfile }}
|
|
target: release
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
build-args: |
|
|
PROJECT_VERSION=${{ inputs.projectVersion }}
|