mirror of
https://github.com/maxkratz/coredns-utils.git
synced 2024-09-16 11:58:07 +00:00
Adds first CI config draft to build the binary
Fixes copy paste error Fixes artifact upload Removes unused files from artifact Adds release step
This commit is contained in:
parent
c07df08269
commit
18e5242be2
1 changed files with 43 additions and 0 deletions
43
.github/workflows/ci.yml
vendored
Normal file
43
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: Build CoreDNS utils
|
||||
on:
|
||||
push:
|
||||
# Run pipeline for commits on branch 'master' and on 'testing/<stuff>'
|
||||
branches:
|
||||
- master
|
||||
- 'testing/**'
|
||||
- 'feature/**'
|
||||
- 'hotfix/**'
|
||||
# Run pipeline for release tags
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
# Build
|
||||
build:
|
||||
runs-on: [ubuntu-20.04]
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
- name: Run make
|
||||
run: |
|
||||
make
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: coredns-keygen
|
||||
path: coredns-keygen/coredns-keygen
|
||||
|
||||
# Create a release if running on tag
|
||||
create-release:
|
||||
needs: [build]
|
||||
runs-on: [ubuntu-20.04]
|
||||
# Only run on pushed tags (and explicitely ignore scheduled runs)
|
||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.event_name != 'schedule'
|
||||
steps:
|
||||
- name: Collect artifacts
|
||||
uses: actions/download-artifact@master
|
||||
- name: Release CoreDNS utils
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
coredns-keygen/coredns-keygen
|
Loading…
Reference in a new issue