Skip to content

fix local extaction #51

fix local extaction

fix local extaction #51

Workflow file for this run

name: AOT Example
on:
push:
workflow_dispatch:
env:
GITHUB_USERNAME: baronfel
# GITHUB_TOKEN: ${{ secrets.CONTAINER_PUSH_PAT }}
ZIG_VERSION: 0.11.0
ZIG_ARCH: x86_64
jobs:
aot:
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
runtimeflavor: [jammy-chiseled, alpine]
include:
- runtimeflavor: jammy-chiseled
os: linux
- runtimeflavor: alpine
os: linux-musl
- runtimeflavor: alpine
arch: arm64
dockerarch: arm64v8
- runtimeflavor: jammy-chiseled
arch: arm64
dockerarch: arm64v8
name: "${{ matrix.runtimeflavor }}-${{ matrix.arch }}"
runs-on: ubuntu-latest
steps:
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: set up qemu
uses: docker/setup-qemu-action@v1
- name: Get the code
uses: actions/checkout@v2
- name: install LLVM
run: |
sudo apt update && sudo apt install llvm
- name: install Zig
run: |
curl https://ziglang.org/download/${{env.ZIG_VERSION}}/zig-linux-${{env.ZIG_ARCH}}-${{env.ZIG_VERSION}}.tar.xz -o zig-linux-${{env.ZIG_ARCH}}-${{env.ZIG_VERSION}}.tar.xz \
&& tar xvf zig-linux-${{env.ZIG_ARCH}}-${{env.ZIG_VERSION}}.tar.xz \
&& export PATH=$PATH:~/zig-linux-${{env.ZIG_ARCH}}-${{env.ZIG_VERSION}} \
&& zig version
- name: build the app for many different RIDs
run: |
dotnet publish /t:PublishContainer \
-p ContainerBaseImage=mcr.microsoft.com/dotnet/runtime-deps:8.0-${{matrix.runtimeflavor}}-${{matrix.dockerarch || matrix.arch}} \
-p ContainerRegistry=ghcr.io \
-p ContainerRepository=${{ github.repository_owner }}/aot-sample \
-p ContainerImageTag=${{matrix.runtimeflavor}}-${{matrix.dockerarch || matrix.arch}} \
--runtime ${{matrix.os}}-${{matrix.arch}} \
-bl
- name: upload binlog
uses: actions/upload-artifact@v3
if: always()
with:
path: src/aot-sample/msbuild.binlog
name: ${{matrix.runtimeflavor}}-${{matrix.arch}}.binlog
- name: run the just-built container
run: |
docker run --rm ghcr.io/${{github.repository_owner}}/aot-sample:${{matrix.runtimeflavor}}-${{matrix.dockerarch || matrix.arch}}
- name: inspect the just-built container
run: |
docker history ghcr.io/${{github.repository_owner}}/aot-sample:${{matrix.runtimeflavor}}-${{matrix.dockerarch || matrix.arch}} --format "{{.ID}}: {{.Size}}"
create-manifest-list:
name: Create Manifest List for aot-sample
needs: [aot]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: create manifest
run: |
docker manifest create ghcr.io/${{github.repository_owner}}/aot-sample:latest \
ghcr.io/${{github.repository_owner}}/aot-sample:jammy-chiseled-amd64 \
ghcr.io/${{github.repository_owner}}/aot-sample:jammy-chiseled-arm64v8 \
ghcr.io/${{github.repository_owner}}/aot-sample:alpine-amd64 \
ghcr.io/${{github.repository_owner}}/aot-sample:alpine-arm64v8
docker manifest push ghcr.io/${{github.repository_owner}}/aot-sample:latest