From 72e02d34e6b0e361faec9f780cc27bb374279094 Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Fri, 21 Jun 2024 19:15:24 +0900 Subject: [PATCH] [WIP] test job to debug the compiler service container github action --- .github/workflows/test-build-container.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test-build-container.yml diff --git a/.github/workflows/test-build-container.yml b/.github/workflows/test-build-container.yml new file mode 100644 index 000000000000..3418cbe3a247 --- /dev/null +++ b/.github/workflows/test-build-container.yml @@ -0,0 +1,34 @@ +# Test build job to debug skopeo issues with OCI containers +name: Test Build For Compiler Service Container + +on: + push: + branches: + - "**" + +jobs: + build: + # This job must never be run on a PR from outside the same repository + runs-on: ubuntu-latest + # These permissions are needed to interact with GitHub's OIDC Token endpoint. + permissions: + id-token: write + contents: read + env: + REVISION_TAG: ${{ github.event.pull_request && github.event.pull_request.head.sha || github.sha }} + PR_NUMBER: ${{ github.event.number }} + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v27 + with: + nix_path: nixpkgs=channel:nixos-22.05 + - uses: cachix/cachix-action@v15 + with: + name: moergo-glove80-zmk-dev + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + - name: Build lambda image + run: nix-build release.nix --arg revision "\"${REVISION_TAG}\"" -A lambdaImage -o lambdaImage + - name: Import OCI image into docker-daemon + env: + REGISTRY: ${{ steps.login-ecr.outputs.registry }} + run: skopeo --insecure-policy copy oci:lambdaImage docker-daemon:$REGISTRY/$ECR_REPOSITORY:$REVISION_TAG