add github actions

This commit is contained in:
Antoine Langlois 2021-08-02 12:02:11 +02:00 committed by DataHearth
parent 7f9d0cd98d
commit 46b2f03636
No known key found for this signature in database
GPG Key ID: E76A9438B81D072B
3 changed files with 1 additions and 53 deletions

View File

@ -1,51 +0,0 @@
kind: pipeline
type: docker
name: publish
steps:
- name: build-push
image: plugins/docker
settings:
repo: ghcr.io/datahearth/ddnsclient
registry: ghcr.io
username:
from_secret: ghcr_username
password:
from_secret: ghcr_password
auto_tag: true
when:
branch:
- master
event:
include:
- push
- tag
---
kind: pipeline
type: docker
name: build-and-test
steps:
- name: build-testing-pr
image: golang
commands:
- go build ./cmd/main.go
- go test
when:
event:
- pull_request
- name: build-testing-master
image: golang
commands:
- go build ./cmd/main.go
- go test
when:
branch:
- master
event:
- push

View File

@ -2,7 +2,6 @@ name: Docker
on:
push:
branches: [ master ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]

View File

@ -9,7 +9,7 @@ on:
jobs:
build:
runs-on: slef-hosted
runs-on: self-hosted
steps:
- uses: actions/checkout@v2