Skip to content

Commit

Permalink
Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
valtyr committed Jun 16, 2021
1 parent f5c8316 commit e6bd49e
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/generateBuild/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# action.yml
name: "Build popcorn"
description: "Generate an iso from popcorn source"
outputs:
time: # id of output
description: "The time we greeted you"
runs:
using: "docker"
image: "valtyr/popcorn-buildenv:latest"
entrypoint: "/bin/bash"
args:
- "./.github/workflows/generateBuild/build.sh"
1 change: 1 addition & 0 deletions .github/workflows/generateBuild/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
make build-x86_64
58 changes: 58 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master]
pull_request:
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
name: Generate artifacts

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Generate build
uses: ./.github/workflows/generateBuild

# - name: Generate web
# run: ./build_web.sh

# - name: Deploy web
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: /build

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release_${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./dist/x86_64/kernel.iso
asset_name: kernel.iso
asset_content_type: application/octet-stream

0 comments on commit e6bd49e

Please sign in to comment.