forked from threefoldtech/zos
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (61 loc) · 2.08 KB
/
bin-package-18.04.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
# Builds a single runtime package, this
# is similar to bin-package but always uses ubuntu:18.04 to
# build the package.
name: Build Extra Binary
on:
workflow_call:
inputs:
package:
description: "package to build"
required: true
type: string
secrets:
token:
required: true
jobs:
builder:
name: builder
runs-on: ubuntu-latest
container: ubuntu:18.04
steps:
- name: Checkout code into the Go module directory
uses: actions/checkout@v1
- name: Set tag of build
id: tag
run: |
ref="${{ github.ref }}"
if [ "${{ github.ref_type }}" = "tag" ]; then
echo "reference=${ref#refs/tags/}" >> $GITHUB_OUTPUT
else
export reference="${{ github.sha }}"
# in container we have do to this is bash because
# the container default sh which has no support for substring
bash -c 'echo "reference=${reference:0:7}" >> $GITHUB_OUTPUT'
fi
- name: Setup basesystem
run: |
cd bins
./bins-extra.sh --package basesystem
- name: Build package (${{ inputs.package }})
id: package
run: |
cd bins
./bins-extra.sh --package ${{ inputs.package }}
- name: Publish flist (tf-autobuilder, ${{ steps.package.outputs.name }})
if: success()
uses: threefoldtech/publish-flist@master
with:
token: ${{ secrets.token }}
action: publish
user: tf-autobuilder
root: bins/releases/${{ inputs.package }}
name: ${{ steps.package.outputs.name }}.flist
- name: Tagging
uses: threefoldtech/publish-flist@master
if: success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main_new')
with:
token: ${{ secrets.token }}
action: tag
user: tf-autobuilder
name: ${{ steps.tag.outputs.reference }}/${{ inputs.package }}.flist
target: tf-autobuilder/${{ steps.package.outputs.name }}.flist