mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-14 21:57:49 +08:00
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
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 }}
|