Add build workflow

pull/3/head
Jack O'Sullivan 3 years ago
parent d99d903d1e
commit 28a43e821a

@ -0,0 +1,35 @@
name: Build
on:
push:
branches:
- golang
jobs:
docker:
runs-on: ubuntu-20.04
env:
CR_PAT_USER: devplayer0
steps:
- uses: actions/checkout@v2
- name: Log into GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: vars
name: Generate build vars
run: |
SHA="${{ github.sha }}"
echo "::set-output name=tag::"${SHA:0:8}-$(date +%s)Z""
- name: Build
run: make PLUGIN_TAG=${{ steps.vars.outputs.tag }} plugin
- name: Push
run: make PLUGIN_TAG=${{ steps.vars.outputs.tag }} push

@ -1,4 +1,4 @@
PLUGIN_NAME = devplayer0/net-dhcp
PLUGIN_NAME = ghcr.io/devplayer0/docker-net-dhcp
PLUGIN_TAG ?= golang
SOURCES = $(shell find pkg/ cmd/ -name '*.go')
@ -39,7 +39,7 @@ disable:
pdebug: create enable
sudo sh -c 'tail -f /var/lib/docker/plugins/*/rootfs/var/log/net-dhcp.log'
push: plugin
push: create
docker plugin push $(PLUGIN_NAME):$(PLUGIN_TAG)
clean:

Loading…
Cancel
Save