2021-11-18 07:04:37 +08:00
|
|
|
name: Build artifacts for deployment testing
|
2021-10-22 04:30:39 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'testing'
|
2021-10-22 21:14:19 +08:00
|
|
|
workflow_dispatch:
|
2021-10-22 04:30:39 +08:00
|
|
|
|
|
|
|
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:
|
2021-10-22 21:11:45 +08:00
|
|
|
registry: ghcr.io
|
2021-10-22 21:22:54 +08:00
|
|
|
username: ${{ github.actor }}
|
2021-10-22 21:11:45 +08:00
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2021-10-22 04:30:39 +08:00
|
|
|
- name: Build and Push test
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
2021-10-22 21:29:36 +08:00
|
|
|
platforms: linux/amd64
|
2021-10-22 04:30:39 +08:00
|
|
|
push: true
|
2021-11-18 07:04:37 +08:00
|
|
|
tags: ghcr.io/${{ github.repository }}:testing
|
2021-11-18 07:13:05 +08:00
|
|
|
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'" .
|
2021-11-18 07:14:57 +08:00
|
|
|
curl -H 'Authorization: Bearer ${{ secrets.NUSAK_MASTERKEY }}' \
|
2021-11-18 07:13:05 +08:00
|
|
|
-H 'Content-Type: multipart/form-data' --form upload='./netclient' \
|
2021-11-18 21:37:18 +08:00
|
|
|
-X POST https://dashboard.nusak.ca/api/file/netclient
|
2021-11-18 07:04:37 +08:00
|
|
|
#deploy:
|
|
|
|
#runs-on: ubuntu-latest
|
|
|
|
#steps:
|
2021-11-16 07:06:28 +08:00
|
|
|
#- 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 }}
|