Skip to content

Commit

Permalink
Add publish deploy YAML to releases (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
jthomperoo authored Sep 28, 2019
1 parent a3146b4 commit bf23721
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
if: github.event_name != 'pull_request' && github.repository == 'jthomperoo/custom-pod-autoscaler-operator'
run: |
docker login --username=$DOCKER_USER --password=$DOCKER_PASS
echo "$DOCKER_PASS" | docker login --username=$DOCKER_USER --password-stdin
if [ ${{ github.event_name }} == "release" ]; then
# This needs to be determined again, due to env vars not being shared between steps
# https://github.com/actions/starter-workflows/issues/68
Expand All @@ -63,3 +63,15 @@ jobs:
else
docker push custompodautoscaler/operator:$(git rev-parse --short ${{ github.sha }})
fi
- name: Bundle YAML config
if: github.event_name == 'release' && github.repository == 'jthomperoo/custom-pod-autoscaler-operator'
run: tar -czvf deploy.tar.gz deploy/*

- name: Deploy YAML config
if: github.event_name == 'release' && github.repository == 'jthomperoo/custom-pod-autoscaler-operator'
uses: Shopify/upload-to-release@1.0.0
with:
name: deploy.tar.gz
path: deploy.tar.gz
repo-token: ${{ secrets.GITHUB_TOKEN }}
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# Custom Pod Autoscaler Operator [ALPHA]

# Custom Pod Autoscaler Operator [PRE-RELEASE]
This is the operator for managing Custom Pod Autoscalers (CPA).

## Installation

Run these commands to install the operator on a Kubernetes cluster:
Pull down configuration
`git clone https://github.com/jthomperoo/custom-pod-autoscaler-operator && cd`
Deploy Custom Resource Defintion for CPAs.
`kubectl apply -f deploy/crds/`
Deploy Operator deployment for managing CPAs.
`kubectl apply -f deploy/`
Run this to install the CPA definition and controller on your cluster:
```
VERSION=0.1.0
curl "https://github.com/jthomperoo/custom-pod-autoscaler-operator/releases/download/${VERSION}/deploy.tar.gz" | tar xvz --to-command 'kubectl apply -f -'
```

## Developing

Expand Down

0 comments on commit bf23721

Please # to comment.