Skip to content

Commit

Permalink
Fix actions to build (#389)
Browse files Browse the repository at this point in the history
* Fix actions to build

Also make sure publishing for dev only works for
master

* Another test

* Fix syntax

* Fix collect script again
  • Loading branch information
Muhamad Azmy authored and zaibon committed Nov 19, 2019
1 parent f4eb7e9 commit 44ee081
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/publish-development.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Release (development)
on:
push:
branches:
- master
branches:
- '*'
tags-ignore:
- v*

jobs:
build:
Expand Down Expand Up @@ -46,7 +48,7 @@ jobs:
echo "::set-output name=build::zos:v$(date +%y%m%d.%-H%M%S.0)-dev.flist"
- name: Promote flist (${{ github.sha }})
if: success()
if: success() && github.ref == 'refs/heads/master'
uses: threefoldtech/publish-flist@master
with:
action: promote
Expand All @@ -57,7 +59,7 @@ jobs:
target: ${{ steps.setname.outputs.build }}

- name: Readlink of current development build
if: success()
if: success() && github.ref == 'refs/heads/master'
id: readlink
uses: threefoldtech/publish-flist@master
with:
Expand All @@ -67,7 +69,7 @@ jobs:
name: tf-zos/zos:development:latest.flist

- name: Delete current build
if: success()
if: success() && github.ref == 'refs/heads/master'
uses: threefoldtech/publish-flist@master
with:
action: delete
Expand All @@ -76,7 +78,7 @@ jobs:
name: ${{ steps.readlink.outputs.linkpoint }}

- name: Symlink flist (development)
if: success()
if: success() && github.ref == 'refs/heads/master'
uses: threefoldtech/publish-flist@master
with:
action: symlink
Expand Down
5 changes: 3 additions & 2 deletions scripts/collect.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!env bash
#!/bin/sh
set -e

# This file is used by CI to build an archive with
# all the binaries, and config files for flist building
Expand All @@ -10,6 +11,6 @@ if [ -z "${archive}" ]; then
exit 1
fi

mkdir -p ${archive}/{bin,etc/zinit}
mkdir -p ${archive}/bin ${archive}/etc
cp bin/* ${archive}/bin/
cp -r etc/* ${archive}/etc/

0 comments on commit 44ee081

Please sign in to comment.