Skip to content

Commit 7cd5ac8

Browse files
committed
Fixup for CI
1 parent 95c5e9c commit 7cd5ac8

3 files changed

Lines changed: 48 additions & 1 deletion

File tree

.github/workflows/image.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ jobs:
2323
- name: Build 🔧
2424
run: |
2525
IMAGE=quay.io/mudler/c3os:latest bash build.sh
26+
- uses: actions/upload-artifact@v2
27+
with:
28+
name: c3os.iso.zip
29+
path: |
30+
*.iso
31+
*.sha256
32+
if-no-files-found: error
2633
- name: Push to quay
2734
run: |
2835
docker push quay.io/mudler/c3os:latest

.github/workflows/release.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build image
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- run: |
13+
git fetch --prune --unshallow
14+
- name: setup-docker
15+
uses: docker-practice/actions-setup-docker@master
16+
- name: Release space from worker
17+
run: |
18+
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
19+
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
20+
- name: Login to Quay Registry
21+
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
22+
- name: Build 🔧
23+
if: startsWith(github.ref, 'refs/tags/')
24+
run: |
25+
TAG=${GITHUB_REF##*/}
26+
ISO=c3os-$TAG IMAGE=quay.io/mudler/c3os:$TAG bash build.sh
27+
mkdir release
28+
mv *.iso release/
29+
mv *.sha256 release/
30+
- name: Push to quay
31+
if: startsWith(github.ref, 'refs/tags/')
32+
run: |
33+
TAG=${GITHUB_REF##*/}
34+
docker push quay.io/mudler/c3os:$TAG
35+
- name: Release
36+
uses: fnkr/github-action-ghr@v1
37+
if: startsWith(github.ref, 'refs/tags/')
38+
env:
39+
GHR_PATH: release/
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ docker build -t $IMAGE .
99
docker run -v $PWD:/cOS \
1010
-v /var/run:/var/run \
1111
--entrypoint /usr/bin/luet-makeiso \
12-
-ti --rm quay.io/costoolkit/toolchain ./iso.yaml --image $IMAGE --output $ISO
12+
-i --rm quay.io/costoolkit/toolchain ./iso.yaml --image $IMAGE --output $ISO

0 commit comments

Comments
 (0)