feat(admission): quota + admission plane (#20) #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build-and-push-images | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| env: | |
| REGISTRY: ghcr.io | |
| ORG: ${{ github.repository_owner }} | |
| PLATFORMS: linux/amd64 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 | |
| - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 | |
| - name: Login to GHCR | |
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Normalize org to lowercase | |
| # ghcr.io/OCI repository names must be lowercase; github.repository_owner | |
| # can be mixed-case (e.g. SourceOS-Linux). Lowercase it for all image tags. | |
| run: echo "ORG=$(printf '%s' "$ORG" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV" | |
| - name: Build & push images | |
| run: | | |
| TAG=${GITHUB_SHA::7} | |
| docker buildx build --platform $PLATFORMS --push -t $REGISTRY/$ORG/cloud-shell:$TAG -f artifacts/cloud-shell-image/Dockerfile artifacts/cloud-shell-image | |
| docker buildx build --platform $PLATFORMS --push -t $REGISTRY/$ORG/cloudshell-spawner:$TAG -f artifacts/cloudshell-hardened-pack/spawner/Dockerfile . | |
| docker buildx build --platform $PLATFORMS --push -t $REGISTRY/$ORG/cloudshell-culler:$TAG -f artifacts/cloudshell-hardened-pack/culler/Dockerfile . | |
| docker buildx build --platform $PLATFORMS --push -t $REGISTRY/$ORG/porter-shim:$TAG -f artifacts/porter-shim/Dockerfile . | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2 | |
| - name: Cosign sign (keyless) | |
| run: | | |
| TAG=${GITHUB_SHA::7} | |
| cosign sign --yes $REGISTRY/$ORG/cloud-shell:$TAG | |
| cosign sign --yes $REGISTRY/$ORG/cloudshell-spawner:$TAG | |
| cosign sign --yes $REGISTRY/$ORG/cloudshell-culler:$TAG | |
| cosign sign --yes $REGISTRY/$ORG/porter-shim:$TAG |