forked from threefoldtech/zos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bootstrap: autobuild: adding v4 to symlink name
- Loading branch information
1 parent
5150166
commit 659d85e
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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-v4: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-v4:latest.flist |