Skip to content

Commit

Permalink
Fixup for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed Jul 30, 2021
1 parent 95c5e9c commit 7cd5ac8
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
- name: Build 🔧
run: |
IMAGE=quay.io/mudler/c3os:latest bash build.sh
- uses: actions/upload-artifact@v2
with:
name: c3os.iso.zip
path: |
*.iso
*.sha256
if-no-files-found: error
- name: Push to quay
run: |
docker push quay.io/mudler/c3os:latest
40 changes: 40 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build image

on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: setup-docker
uses: docker-practice/actions-setup-docker@master
- name: Release space from worker
run: |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
- name: Login to Quay Registry
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
- name: Build 🔧
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG=${GITHUB_REF##*/}
ISO=c3os-$TAG IMAGE=quay.io/mudler/c3os:$TAG bash build.sh
mkdir release
mv *.iso release/
mv *.sha256 release/
- name: Push to quay
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG=${GITHUB_REF##*/}
docker push quay.io/mudler/c3os:$TAG
- name: Release
uses: fnkr/github-action-ghr@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GHR_PATH: release/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ docker build -t $IMAGE .
docker run -v $PWD:/cOS \
-v /var/run:/var/run \
--entrypoint /usr/bin/luet-makeiso \
-ti --rm quay.io/costoolkit/toolchain ./iso.yaml --image $IMAGE --output $ISO
-i --rm quay.io/costoolkit/toolchain ./iso.yaml --image $IMAGE --output $ISO

0 comments on commit 7cd5ac8

Please sign in to comment.