-
Notifications
You must be signed in to change notification settings - Fork 16
60 lines (59 loc) · 1.97 KB
/
publish-bootstrap.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
name: Publish Bootstrap
on:
push:
paths:
- "bootstrap/bootstrap/**"
- ".github/workflows/publish-bootstrap.yaml"
jobs:
bootstrap:
name: Building
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Prepare musl
run: |
sudo apt-get update
sudo apt-get install -y musl musl-tools
- name: Setup toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- name: Build bootstrap
run: make release
working-directory: bootstrap/bootstrap
- name: Collecting files
run: |
mkdir -p ${{ github.workspace }}/archive/sbin/
cp -a bootstrap/bootstrap/target/x86_64-unknown-linux-musl/release/bootstrap ${{ github.workspace }}/archive/sbin/
- name: Set name of the development build
id: setname
run: |
echo "build=bootstrap-v$(date +%y%m%d.%-H%M%S.0)-dev.flist" >> $GITHUB_OUTPUT
- name: Publish flist (${{ steps.setname.outputs.build }})
if: success()
uses: threefoldtech/publish-flist@master
with:
action: publish
user: tf-autobuilder
root: archive
token: ${{ secrets.HUB_JWT }}
name: ${{ steps.setname.outputs.build }}
- name: Symlink flist (development)
if: success()
uses: threefoldtech/publish-flist@master
with:
action: symlink
user: tf-autobuilder
token: ${{ secrets.HUB_JWT }}
name: ${{ steps.setname.outputs.build }}
target: bootstrap:development.flist
- name: Symlink flist (release)
if: success() && github.ref == 'refs/heads/main'
uses: threefoldtech/publish-flist@master
with:
action: symlink
user: tf-autobuilder
token: ${{ secrets.HUB_JWT }}
name: ${{ steps.setname.outputs.build }}
target: bootstrap:latest.flist