2020-11-20 12:52:31 +01:00
|
|
|
name: CI Build
|
|
|
|
|
|
|
|
# Controls when the action will run.
|
|
|
|
on:
|
|
|
|
# Triggers the workflow on push or pull request events but only for the main branch
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2020-11-23 10:56:11 +01:00
|
|
|
schedule:
|
|
|
|
- cron: '30 6 * * 1' # At 06:30 on Monday, every Monday.
|
2020-11-20 12:52:31 +01:00
|
|
|
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
|
|
steps:
|
2020-11-23 10:56:11 +01:00
|
|
|
# http://man7.org/linux/man-pages/man1/date.1.html
|
|
|
|
- name: Create Cache Key
|
|
|
|
id: cache-key
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=key::$(/bin/date -u "+%Y%U")"
|
|
|
|
shell: bash
|
|
|
|
|
2020-11-20 12:52:31 +01:00
|
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-21 21:40:57 +01:00
|
|
|
|
|
|
|
# Enable caching of Docker layers
|
2021-03-19 17:23:48 +01:00
|
|
|
- uses: satackey/action-docker-layer-caching@v0.0.11
|
2020-11-21 17:00:30 +01:00
|
|
|
continue-on-error: true
|
2020-11-23 10:56:11 +01:00
|
|
|
with:
|
|
|
|
key: docker-cache-${{ steps.cache-key.outputs.key }}-{hash}
|
|
|
|
restore-keys: |
|
|
|
|
docker-cache-${{ steps.cache-key.outputs.key }}-
|
2020-11-20 12:52:31 +01:00
|
|
|
|
|
|
|
# Run the make script
|
2020-11-21 17:00:30 +01:00
|
|
|
- name: Make build
|
|
|
|
run: make build
|
2020-11-30 13:49:25 +01:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
if: ${{ failure() }}
|
|
|
|
with:
|
2021-03-28 14:02:39 +02:00
|
|
|
name: artifacts
|
|
|
|
path: .
|