Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Aug 4, 2020
1 parent 99cd8b8 commit f5682ff
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Docker Push
on:
release:
types: published
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: crazy-max/ghaction-docker-buildx@v3
with:
buildx-version: latest
qemu-version: latest
- name: Docker build
run: |
echo "${{ secrets.DOCKER }}" | docker login --username carlgo11 --password-stdin
docker buildx create --use
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo VERSION=$VERSION
docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64 --rm --tag carlgo11/guest-portal:latest --tag carlgo11/guest-portal:$VERSION --push --compress .
18 changes: 18 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
10 changes: 9 additions & 1 deletion .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Jekyll test

on: [push]
on:
push:
branches: master
paths: ./jekyll
pull_request:
branches: master
paths: ./jekyll

jobs:
Build_Test:
Expand All @@ -15,10 +21,12 @@ jobs:
restore-keys: ${{ runner.os }}-bundle-
- uses: actions/setup-ruby@v1
- name: Install dependencies
working-directory: ./jekyll
run: |
bundle config set path 'vendor/cache'
bundle config set cache_all true
bundle install --jobs 4 --retry 3
[ -d "vendor/cache" ] || { bundle package; }
- name: Build Jekyll site
run: bundle exec jekyll build
working-directory: ./jekyll

0 comments on commit f5682ff

Please sign in to comment.