mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-10 07:05:28 +08:00
Merge pull request #481 from mattkasun/testing
Updated (Renamed) workflow to produce artifacts for deployement testing
This commit is contained in:
commit
cd67943f55
2 changed files with 52 additions and 1 deletions
51
.github/workflows/test-artifacts.yml
vendored
Normal file
51
.github/workflows/test-artifacts.yml
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
name: Build artifacts for deployment testing
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'testing'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and Push test
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ghcr.io/${{ github.repository }}:testing
|
||||
netclient:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: build client
|
||||
run: |
|
||||
cd netclient
|
||||
go build -ldflags="-X 'main.version=testing'" .
|
||||
curl -H 'Authorization: Bearer ${{ secrets.NUSAK_MASTERKEY }}' \
|
||||
-H 'Content-Type: multipart/form-data' --form upload='./netclient' \
|
||||
-X POST https://dashboard.nusak.ca/api/file/netclient
|
||||
#deploy:
|
||||
#runs-on: ubuntu-latest
|
||||
#steps:
|
||||
#- name: Deploy Testing Server and Client(s)
|
||||
# run: |
|
||||
# curl -X POST https://api.github.com/mattkasun/terraform-test/dispatches \
|
||||
# -H 'Accept: application/vnd.github.everest-preview+json' \
|
||||
# -u ${{ secrets.ACCESS_TOKEN }}
|
|
@ -7,7 +7,7 @@ COPY . .
|
|||
|
||||
ENV GO111MODULE=auto
|
||||
|
||||
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=1 /usr/local/go/bin/go build -ldflags="-w -s" -o netmaker main.go
|
||||
RUN GOOS=linux CGO_ENABLED=1 /usr/local/go/bin/go build -ldflags="-w -s" -o netmaker main.go
|
||||
|
||||
FROM alpine:3.13.6
|
||||
# add a c lib
|
||||
|
|
Loading…
Add table
Reference in a new issue