зеркало из https://github.com/microsoft/CCF.git
40 строки
1.3 KiB
YAML
40 строки
1.3 KiB
YAML
name: "Build and Publish CI Containers to ACR"
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "ccf_ci_image/*"
|
|
|
|
env:
|
|
ACR_REGISTRY: ccfmsrc.azurecr.io
|
|
ACR_TOKEN_NAME: ci-push-token
|
|
DOCKER_BUILDKIT: 1 # https://docs.docker.com/develop/develop-images/build_enhancements/
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
build:
|
|
name: "Build and Publish CI Containers"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Truncate ref
|
|
run: echo "tag=${GITHUB_REF#refs/tags/ccf_ci_image/}" >> $GITHUB_OUTPUT
|
|
id: tref
|
|
|
|
- name: Build CCF CI sgx container
|
|
run: docker build -f docker/ccf_ci . --build-arg="platform=sgx" -t $ACR_REGISTRY/ccf/ci:${{steps.tref.outputs.tag}}-sgx
|
|
|
|
- name: Build CCF CI snp clang 15 container
|
|
run: docker build -f docker/ccf_ci . --build-arg="platform=snp" --build-arg="clang_version=15" -t $ACR_REGISTRY/ccf/ci:${{steps.tref.outputs.tag}}-snp-clang15
|
|
|
|
- name: Build CCF CI virtual clang 15 container
|
|
run: docker build -f docker/ccf_ci . --build-arg="platform=virtual" --build-arg="clang_version=15" -t $ACR_REGISTRY/ccf/ci:${{steps.tref.outputs.tag}}-virtual-clang15
|
|
|
|
- name: Log in
|
|
run: docker login -u $ACR_TOKEN_NAME -p ${{ secrets.ACR_CI_PUSH_TOKEN_PASSWORD }} $ACR_REGISTRY
|
|
|
|
- name: Push CI container
|
|
run: docker push $ACR_REGISTRY/ccf/ci --all-tags
|