-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 2.71 KB
/
generate-project.yml
File metadata and controls
68 lines (58 loc) · 2.71 KB
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
61
62
63
64
65
66
67
68
name: Harbormaster Project Accelerator GitHub Action
on: [push]
env:
###################################################################
# This token is provided during the creation of your user account
# on a Harbormaster instance.
#
# For security purposes, you should store is as a development environment secret
# within GitHub and refer to it here.
#
# If you do not have your token,
# contact your Harbormaster administrator.
###################################################################
HARBORMASTER_API_TOKEN: "your-token-here"
###################################################################
# the location of the Harbormaster Instance to connect to
# leave it blank to use the default public instance
###################################################################
HARBORMASTER_INSTANCE_URL: "http://35.202.248.30/service"
###################################################################
# This is the location and name of the file to provide to
# Harbormaster containing your directives to generate the project.
#
# The samples directory contains samples models and project.as.code
# files. They are provided for illustrative purposes to guide
# you in creating your own.
#
# The file used here is relative to GitHub env var $GITHUB_WORKSPACE
# To learn more, visit https://harbormaster.net/2025/harbormaster-project-commands/
###################################################################
PROJECT_YAML_FILE: "samples/yamls/project.as.code/django-project-as-code.yml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
who-to-greet: 'any-name-here'
###################################################################
# Harbormaster CLI is a NodeJS pacage. It first must be installed
###################################################################
- name: Install Harbormaster
run: npm install -g harbormaster-ai
###################################################################
# Once installed, it can be run using it's registered name of harbormaster
# The token is provided here to validate your credentials
#
# If a connection to the default public instance is to be used,
# the url parameter can be left blank. If accessing a different
# instance, its URL must be provided.
###################################################################
- name: Initialize Harbormaster
run: harbormaster init $HARBORMASTER_API_TOKEN $HARBORMASTER_INSTANCE_URL
- name: Generate project
run: harbormaster project_generate $GITHUB_WORKSPACE/$PROJECT_YAML_FILE