kmk_firmware/.github/workflows/deploy.yml

34 lines
731 B
YAML
Raw Normal View History

2020-09-14 23:34:22 +02:00
name: Deploy
on:
push:
branches: [ master ]
create:
tags: [ '*' ]
jobs:
build:
runs-on: ubuntu-latest
container: kmkfw/base
steps:
- uses: actions/checkout@v2
2020-10-16 23:05:28 +02:00
- name: Test the code (lint)
run: make test
- name: Package the code
run: make dist
2020-10-16 22:56:04 +02:00
2020-10-16 23:05:28 +02:00
- name: Write the s3cfg secret
run: echo "${secrets.S3CFG}" > .s3cfg
- name: Branch based code deployment
run: make dist-deploy
2020-09-14 23:34:22 +02:00
if: github.event_name == 'push'
env:
2020-10-16 22:56:04 +02:00
CIRCLE_BRANCH: "${GITHUB_REF_NAME}"
2020-10-16 23:05:28 +02:00
- name: Tag based code deployment
run: make dist-deploy
2020-09-14 23:34:22 +02:00
if: github.event_name == 'create'
env:
2020-10-16 22:56:04 +02:00
CIRCLE_TAG: "${GITHUB_REF_NAME}"