Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-platform image names (#6273) #6281

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 17 additions & 33 deletions .github/workflows/ci-containers-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,20 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
- name: Extract metadata (tags, labels) for default image
id: meta_default
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}/ci
flavor: |
latest=false
images: ${{ env.REGISTRY }}/${{ github.repository }}/ci/default

- name: Build and push Virtual container
id: push_virtual
uses: docker/build-push-action@v6
- name: Extract metadata (tags, labels) for SGX image
id: meta_sgx
uses: docker/metadata-action@v5
with:
context: .
file: ./docker/ccf_ci
build-args: |
platform=virtual
clang_version=15
push: true
tags: ${{ steps.meta.outputs.tags }}-virtual-clang15
labels: ${{ steps.meta.outputs.labels }}
images: ${{ env.REGISTRY }}/${{ github.repository }}/ci/sgx

- name: Build and push SNP container
id: push_snp
- name: Build and push default container
id: push_default
uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -60,8 +51,8 @@ jobs:
platform=snp
clang_version=15
push: true
tags: ${{ steps.meta.outputs.tags }}-snp-clang15
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta_default.outputs.tags }}
labels: ${{ steps.meta_default.outputs.labels }}

- name: Build and push SGX container
id: push_sgx
Expand All @@ -72,26 +63,19 @@ jobs:
build-args: |
platform=sgx
push: true
tags: ${{ steps.meta.outputs.tags }}-sgx
labels: ${{ steps.meta.outputs.labels }}

- name: Attest Virtual container
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci
subject-digest: ${{ steps.push_virtual.outputs.digest }}
push-to-registry: true
tags: ${{ steps.meta_sgx.outputs.tags }}
labels: ${{ steps.meta_sgx.outputs.labels }}

- name: Attest SNP container
- name: Attest default container
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci
subject-digest: ${{ steps.push_sgx.outputs.digest }}
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci/default
subject-digest: ${{ steps.push_default.outputs.digest }}
push-to-registry: true

- name: Attest SGX container
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci/sgx
subject-digest: ${{ steps.push_sgx.outputs.digest }}
push-to-registry: true
Loading