-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (63 loc) · 2.08 KB
/
wsl.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
name: Create WSLv1 image
on:
push:
tags:
- 'wsl-*'
jobs:
create_image:
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: Get the version
uses: olegtarasov/get-tag@v2.1
id: get_version
- name: Clone repository
uses: actions/checkout@v3
with:
token: ${{ secrets.MORAJLAB_MJI_PAT_TOKEN }}
submodules: 'recursive'
- name: Install uplink cli
run: |
.\scripts\workflow\install_uplink.ps1 `
-url https://github.com/storj/storj/releases/latest/download/uplink_windows_amd64.zip `
-token ${{ secrets.MORAJLAB_STORJ_TOKEN }} `
-name mji_wsl_images
- name: Install distro
uses: Vampire/setup-wsl@v1
with:
distribution: Ubuntu-20.04
update: 'false'
additional-packages: |
unzip
- name: Provision distro
shell: wsl-bash -u root {0}
run: |
./packages/provision/bin/provision.sh --bpm-install-url ${{ secrets.BPM_INSTALL_URL }}
- name: Export WSL image
run: |
wsl --export Ubuntu mji-${{ steps.get_version.outputs.tag }}
- name: Upload distro image
run: |
.\scripts\workflow\upload_object.ps1 `
-file .\mji-${{ steps.get_version.outputs.tag }} `
-bucket wsl-images
- name: Get object URL
id: image_object_url
run: |
$url = .\scripts\workflow\get_obj_url.ps1 `
sj://wsl-images/mji-${{ steps.get_version.outputs.tag }}
Write-Output "::set-output name=url::$url"
- name: Create 'NOTES.md' file
shell: wsl-bash -u mjl {0}
run: |
./scripts/workflow/release_notes.sh \
-d ./mji-${{ steps.get_version.outputs.tag }} \
-u ${{ steps.image_object_url.outputs.url }} > ./NOTES.md
- name: Release image
run: |
.\scripts\workflow\release.ps1 -tag ${{ steps.get_version.outputs.tag }} `
-notesfile ./NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.MORAJLAB_MJI_PAT_TOKEN }}