|
| 1 | +name: Publish Bootstrap |
| 2 | +on: |
| 3 | + push: |
| 4 | + paths: |
| 5 | + - "bootstrap/bootstrap/**" |
| 6 | + - ".github/workflows/publish-bootstrap.yaml" |
| 7 | + |
| 8 | +jobs: |
| 9 | + bootstrap: |
| 10 | + name: Building |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - name: Checkout code |
| 14 | + uses: actions/checkout@master |
| 15 | + - name: Prepare musl |
| 16 | + run: | |
| 17 | + sudo apt-get update |
| 18 | + sudo apt-get install -y musl musl-tools |
| 19 | + - name: Setup toolchain |
| 20 | + uses: dtolnay/rust-toolchain@stable |
| 21 | + with: |
| 22 | + targets: x86_64-unknown-linux-musl |
| 23 | + - name: Build bootstrap |
| 24 | + run: make release |
| 25 | + working-directory: bootstrap/bootstrap |
| 26 | + - name: Collecting files |
| 27 | + run: | |
| 28 | + mkdir -p ${{ github.workspace }}/archive/sbin/ |
| 29 | + cp -a bootstrap/bootstrap/target/x86_64-unknown-linux-musl/release/bootstrap ${{ github.workspace }}/archive/sbin/ |
| 30 | + - name: Set name of the development build |
| 31 | + id: setname |
| 32 | + run: | |
| 33 | + echo "build=bootstrap-v$(date +%y%m%d.%-H%M%S.0)-dev.flist" >> $GITHUB_OUTPUT |
| 34 | + - name: Publish flist (${{ steps.setname.outputs.build }}) |
| 35 | + if: success() |
| 36 | + uses: threefoldtech/publish-flist@master |
| 37 | + with: |
| 38 | + action: publish |
| 39 | + user: tf-autobuilder |
| 40 | + root: archive |
| 41 | + token: ${{ secrets.HUB_JWT }} |
| 42 | + name: ${{ steps.setname.outputs.build }} |
| 43 | + - name: Symlink flist (development) |
| 44 | + if: success() |
| 45 | + uses: threefoldtech/publish-flist@master |
| 46 | + with: |
| 47 | + action: symlink |
| 48 | + user: tf-autobuilder |
| 49 | + token: ${{ secrets.HUB_JWT }} |
| 50 | + name: ${{ steps.setname.outputs.build }} |
| 51 | + target: bootstrap-v4:development.flist |
| 52 | + - name: Symlink flist (release) |
| 53 | + if: success() && github.ref == 'refs/heads/main' |
| 54 | + uses: threefoldtech/publish-flist@master |
| 55 | + with: |
| 56 | + action: symlink |
| 57 | + user: tf-autobuilder |
| 58 | + token: ${{ secrets.HUB_JWT }} |
| 59 | + name: ${{ steps.setname.outputs.build }} |
| 60 | + target: bootstrap-v4:latest.flist |
0 commit comments