Skip to content

chore: update github actions #90

chore: update github actions

chore: update github actions #90

Workflow file for this run

name: Build
on: [push]
permissions:
id-token: write
packages: write
contents: write
jobs:

Check failure on line 7 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

You have an error in your yaml syntax on line 7
build:
strategy:
matrix:
include:
- arch: "amd64"
- arch: "arm64"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Build Debian based docker image
uses: depot/build-push-action@v1
with:
file: Dockerfile
context: .
platforms: linux/${{ matrix.arch }}
tags: ${{ github.repository_owner }}/genext2fs:${{ matrix.arch }}
push: false
load: true
cache-from: type=gha,scope=debian
cache-to: type=gha,mode=max,scope=debian
project: ${{ vars.DEPOT_PROJECT }}
- name: Extract artifacts from image
run: |
mkdir artifacts
make -f build.mk copy IMG=${{ github.repository_owner }}/genext2fs:${{ matrix.arch }} BUILD_PLATFORM=linux/${{ matrix.arch }} CP_FROM=xgenext2fs.deb CP_TO=artifacts/xgenext2fs_${{ matrix.arch }}.deb
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: artifacts_${{ matrix.arch }}
path: artifacts/xgenext2fs_${{ matrix.arch }}.deb
release:
needs: [build]
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
prerelease: true
files: |
artifacts/xgenext2fs_amd64.deb
artifacts/xgenext2fs_arm64.deb
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}