Skip to content

Add ENCLAVE_KEY_PATH env variable in cenclave-test script #4

Add ENCLAVE_KEY_PATH env variable in cenclave-test script

Add ENCLAVE_KEY_PATH env variable in cenclave-test script #4

Workflow file for this run

name: Cosmian Enclave base container image
on:
# Only run when pull request is closed and merged into main/develop
pull_request:
branches:
- main
types:
- closed
# Do not run on push
push:
branches-ignore:
- "**"
tags-ignore:
- "**"
env:
REGISTRY: ghcr.io
jobs:
build:
name: Build
runs-on: ubuntu-22.04
permissions:
packages: write
contents: read
env:
IMAGE: ghcr.io/cosmian/cenclave-base
steps:
- name: Build date
id: build_date
run: |
echo "BUILD_DATE=$(date -u +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
- name: Login to GitHub Packages
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ contains(github.ref, 'main') }}
tags: |
${{ env.IMAGE }}:${{ github.sha }}
${{ env.IMAGE }}:${{ steps.build_date.outputs.BUILD_DATE }}
labels: ${{ steps.meta.outputs.labels }}