-
Notifications
You must be signed in to change notification settings - Fork 1
130 lines (124 loc) · 5.85 KB
/
manual.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Manual Build and Release
permissions: write-all
on:
workflow_dispatch:
inputs:
version:
required: true
type: string
default: "7.16"
script:
required: true
type: string
default: "jaclaz"
arch:
required: false
type: string
default: ""
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install packages into building machine
run: |
sudo apt-get update
sudo apt-get install -y unzip qemu-utils rsync gdisk dosfstools parted genisoimage zip
- name: Set version based on manually triggered build
id: get-version-custom
run: |
echo "ROSVER=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- name: Print versions for debugging
run: |
echo "Build using $ROSVER with ${{ github.event.inputs.script }} script"
- name: Run ${{ github.event.inputs.script }} script to download and modify the CHR images
run: sudo bash ${{ github.event.inputs.script }} $ROSVER
- name: Upload created image files as artifacts of build
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: ./chr*
- name: Push git tag to save builder's code (required for release)
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git tag Build${{ github.run_id }}-${{github.event.inputs.script}}
git push origin Build${{ github.run_id }}-${{github.event.inputs.script}}
- name: Create GitHub release
id: create-release
uses: actions/create-release@v1 # comnoco/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: Build${{ github.run_id }}-${{github.event.inputs.script}} # ${{ github.ref }}
release_name: ${{ env.ROSVER }}-${{ github.event.inputs.script }}
body: |
UEFI-enabled CHR images, built by GitHub
`chr-${{ env.ROSVER }}.uefi-fat-${{ github.event.inputs.script }}.raw` for VirtIO-based hypervisors
`chr-${{ env.ROSVER }}.uefi-fat-${{ github.event.inputs.script }}.vmdk` for VMWare (with UEFI BIOS in VMX file)
Optionally, there is a CHR "extra-packages" disk images that can be mounted to more easily add them.
For debugging, a `partition-debug--${{ env.ROSVER }}.zip` so the disk image can be viewed using Apple's tools.
*Verison:* **${{ env.ROSVER }} (${{ github.event.inputs.script }})** [ Build ${{ github.run_id }} ]
draft: false
prerelease: true
- name: Upload CHR RAW image to release
id: upload-release-asset-raw
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./chr-${{ env.ROSVER }}.uefi-fat.raw
asset_name: chr-${{ env.ROSVER }}.uefi-fat-${{ github.event.inputs.script }}.raw
asset_content_type: application/octet-stream
- name: Upload CHR VMDK image to release
id: upload-release-asset-vmdk
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./chr-${{ env.ROSVER }}.uefi-fat.vmdk
asset_name: chr-${{ env.ROSVER }}.uefi-fat-${{ github.event.inputs.script }}.vmdk
asset_content_type: application/octet-stream
- name: Upload ZIP for debugging files on each paritition
id: upload-release-asset-partition-debug-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./partition-debug-${{ env.ROSVER }}.zip
asset_name: partition-debug-${{ env.ROSVER }}-${{ github.event.inputs.script }}.zip
asset_content_type: application/octet-stream
- name: Upload CHR extra-packages image to release (RAW)
id: upload-release-asset-extra-packages-raw
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./chr-extra-packages-${{ env.ROSVER }}${{ github.event.inputs.arch }}.img
asset_name: extra-packages-${{ env.ROSVER }}${{ github.event.inputs.arch }}.img
asset_content_type: application/octet-stream
- name: Upload CHR extra-packages image to release (VMDK)
id: upload-release-asset-extra-packages-vmdk
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./chr-extra-packages-${{ env.ROSVER }}${{ github.event.inputs.arch }}.vmdk
asset_name: extra-packages-${{ env.ROSVER }}${{ github.event.inputs.arch }}.vmdk
asset_content_type: application/octet-stream
- name: Upload CHR extra-packages image to release (ISO)
id: upload-release-asset-extra-packages-iso
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./chr-extra-packages-${{ env.ROSVER }}${{ github.event.inputs.arch }}.iso
asset_name: extra-packages-${{ env.ROSVER }}${{ github.event.inputs.arch }}.iso
asset_content_type: application/octet-stream