forked from bestouff/genext2fs
-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (58 loc) · 1.82 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build
on: [push]
permissions:
id-token: write
packages: write
contents: write
jobs:
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: ls
run: ls . artifacts artifacts_amd64 artifacts_arm64;
# - 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 }}