-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 2.29 KB
/
workflow_dispatch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This workflow is a POC for demonstrating using Waypoint in an ephemeral
# and remote environment, that is _easily_ executable via API call.
name: Waypoint
run-name: Waypoint
on:
workflow_dispatch:
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Install Nixpacks
run: |
curl -sSL https://nixpacks.com/install.sh | sudo bash
- name: Install protoc
run: |
sudo apt update && sudo apt install -y protobuf-compiler
protoc --version
- name: Install proto-gen-go
run: |
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install Waypoint CLI
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install waypoint
- name: Create Waypoint Context
run: |
waypoint context create \
-server-addr=${{ secrets.WAYPOINT_SERVER_ADDR }} \
-server-auth-token=${{ secrets.WAYPOINT_SERVER_TOKEN }} \
-server-require-auth=true \
-server-platform="hcp" \
-set-default \
hcp-waypoint-gh-runner
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run Arbitrary Waypoint Command
run: |
waypoint runner list -json | jq
- name: Checkout waypoint-plugin-nixpacks
uses: actions/checkout@v3
with:
repository: thiskevinwang/waypoint-plugin-nixpacks
path: waypoint-plugin-nixpacks
- name: Build waypoint-plugin-nixpacks plugin
working-directory: waypoint-plugin-nixpacks
run: |
make
- name: Build project with waypoint
working-directory: waypoint-plugin-nixpacks/examples/node-express
run: |
waypoint init
waypoint build