Skip to content

Commit

Permalink
feat: Add chart publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maso7 committed May 16, 2023
1 parent eef291c commit 451734e
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 4 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release Charts

on:
push:
branches:
- master
paths:
- 'charts/**'
- '.github/workflows/publish-chart.yml'
workflow_dispatch:

env:
HELM_VERSION: v3.12.0

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Set up Helm
uses: azure/[email protected]
with:
version: ${{ env.HELM_VERSION }}

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.build
.tarballs
.DS_STORE
ec2-price-exporter
/ec2-price-exporter
bin
vendor
.env
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ make build

#### Docker

An auto-built image is available at https://hub.docker.com/r/andreziviani/ec2-price-exporter/
An auto-built image is available at https://ghcr.io/pixelfederation/ec2-price-exporter

```
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY andreziviani/ec2-price-exporter
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY pixelfederation/ec2-price-exporter
```

### Run as dev
Expand Down Expand Up @@ -47,8 +47,26 @@ Usage of ./spot-price-exporter:
How long should the results be cached, in seconds (defaults to *0*)
-lifecycle string
Comma separated list of Lifecycles (spot or ondemand) to get pricing for (defaults to *all*)
-instance-regexes string
Comma separated list of instance type regexes (defaults to *all*)
```

## Installing the Chart

The chart can be installed as follows:

```console
$ helm repo add ec2-price-exporter https://pixelfederation.github.io/ec2-price-exporter
$ helm --namespace=ec2-price-exporter install ec2-price-exporter pixelfederation/ec2-price-exporter
```

To uninstall/delete the `ec2-price-exporter` deployment:

```console
$ helm uninstall ec2-price-exporter
```
The command removes all the Kubernetes components associated with the chart and deletes the release.

### Example metrics

```
Expand Down
2 changes: 1 addition & 1 deletion charts/ec2-price-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
The chart can be installed as follows:

```console
$ helm repo add unbound https://pixelfederation.github.io/ec2-price-exporter
$ helm repo add ec2-price-exporter https://pixelfederation.github.io/ec2-price-exporter
$ helm --namespace=ec2-price-exporter install ec2-price-exporter pixelfederation/ec2-price-exporter
```

Expand Down

0 comments on commit 451734e

Please sign in to comment.