Skip to content

Add org name

Add org name #4

name: "Build and Publish CI Containers to GHCR"
on:
push:
tags:
- "test_build/*"
env:
REGISTRY: ghcr.io
jobs:
build:
name: "Build and Publish CI Containers"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}/ci
- name: Build and push Virtual container
id: push
uses: docker/build-push-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 }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/ci
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true