Skip to content

Commit

Permalink
Set up CI for repo using github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
  • Loading branch information
amisevsk committed Dec 17, 2019
1 parent 571b9fe commit 4a3e20d
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
pull_request:
branches:
- master

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Shellcheck
run: |
find . -type f -name '*.sh' | wc -l
find . -type f -name '*.sh' | xargs shellcheck --external-sources
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Cache docker layers
uses: actions/cache@v1
with:
path: ./caches
key: v1-${{ github.head_ref }}

- name: Load docker layer cache
run: |
set +o pipefail
docker load -i ./caches/app.tar | true
- name: Build devfile registry
run: |
docker build \
--cache-from=app \
-t app \
-f ./build/dockerfiles/Dockerfile \
--target registry .
- name: Cache docker layers
run: |
mkdir -p ./caches
docker save -o ./caches/app.tar app
- name: Build offline devfile registry
run: |
docker build \
--cache-from=app \
-t app \
-f ./build/dockerfiles/Dockerfile \
--target offline-registry .

0 comments on commit 4a3e20d

Please sign in to comment.