-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
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
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,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 }} |
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