From dc0a1025c131b4a52ffdde912ef5df9e69cca11d Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Tue, 12 Nov 2024 14:29:25 +0100 Subject: [PATCH] GHA: Add mirageos workflow (moved from toplevel) --- .github/workflows/mirageos.yml | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/mirageos.yml diff --git a/.github/workflows/mirageos.yml b/.github/workflows/mirageos.yml new file mode 100644 index 000000000..ad2272c19 --- /dev/null +++ b/.github/workflows/mirageos.yml @@ -0,0 +1,41 @@ +name: Build MirageOS docker image + +on: + push: + paths: + - ".github/workflows/mirageos.yml" + - "docker/Dockerfile.muen-mirageos" + +jobs: + build: + name: Build image + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Log in to Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build Docker image + id: docker_build + uses: docker/build-push-action@v5 + with: + context: . + file: ./docker/Dockerfile.muen-mirageos + platforms: linux/amd64 + push: ${{ github.ref == 'refs/heads/devel' }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + tags: ghcr.io/codelabs-ch/muen-mirageos:latest