Skip to content

Commit

Permalink
update make and build
Browse files Browse the repository at this point in the history
  • Loading branch information
rodg committed Jul 4, 2023
1 parent 9883c0b commit f1f6e96
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/publish-to-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
EVENT: example
RELEASE_NAME: example-release
CLUSTER: test-automation
CONTAINER_REGISTRY: registry.digitalocean.com

jobs:
build_and_push:
Expand Down Expand Up @@ -38,10 +39,14 @@ jobs:
run: doctl registry login --expiry-seconds 600

- name: Build image # (callout-2)
run: make publish version=$(echo $GITHUB_SHA | head -c7)-$EVENT
run: |
VERSION=$(echo $GITHUB_SHA | head -c7)-$EVENT
DEPLOY_NAME=$CONTAINER_REGISTRY/$IMAGE_NAME
make publish version=${VERSION} deploy_name=${DEPLOY_NAME} \
registry=$CONTAINER_REGISTRY
- name: Update deployment file
run: TAG=$(echo $GITHUB_SHA | head -c7)-$EVENT && sed -i 's|<VERSION>|'${TAG}'|' $GITHUB_WORKSPACE/config/values.yaml
run: TAG=${VERSION} && sed -i 's|<VERSION>|'${TAG}'|' $GITHUB_WORKSPACE/config/values.yaml

- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 $CLUSTER
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Nodecg Automation

This is a template for creating a continuously delivered nodecg dashboard for speedrun marathons.

## Usage

1. Create your own repository from this template. Make it a private repository if you plan to have any sensitive info stored.
2. Edit `config/values.yaml` with your domain info. For the most basic setup you only need to fill in the `dashboard` info.
3.
7 changes: 3 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
registry:=registry.digitalocean.com
image_name:=rods-registry/nodecg-base
deploy_name:=rods-registry/nodecg
registry?=registry.digitalocean.com
deploy_name?=rods-registry/nodecg
# version for dev and testing locally
version?=$(shell find . -type f -exec sha1sum {} + | awk '{print $1}' | sort | sha1sum | cut -c 1-8)

base_image = ${registry}/${image_name}
deploy_image = ${registry}/${deploy_name}

build:
Expand Down

0 comments on commit f1f6e96

Please sign in to comment.