Skip to content

Commit

Permalink
feature: remove custom values, rename to config, update readme (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 authored Jun 13, 2024
1 parent b847d1e commit 731b85f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 51 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
id: starship
with:
name: test-with-values
values: config.yaml
config: config.yaml

- name: Check kubectl pods
run: |
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
with:
name: test-kubeconfig
kubeconfig: ${{ steps.kubeconfig.outputs.content }}
values: config.yaml
config: config.yaml

- name: Check kubectl pods
run: |
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
id: starship
with:
name: test-no-portforward
values: config.yaml
config: config.yaml

- name: Check kubectl pods
run: |
Expand Down
37 changes: 7 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For more information, reference the GitHub Help Documentation for [Creating a wo

For more information on inputs, see the [API Documentation](https://developer.github.com/v3/repos/releases/#input)

- `values`: Required, config for helm chart for starship devnet inputs
- `config`: Required, config file for helm chart for starship devnet inputs
- `version`: Optional, version of devnet helm chart from starship (default: `0.2.3`)
- `cli-version`: Optional, version of @starship-ci/cli to use (default: `2.4.0`)
- `kubeconfig`: Optional, Kubeconfig for remote cluster, if set, will be used instead of creating local kind cluster
Expand All @@ -39,36 +39,13 @@ on: pull_request
jobs:
create-devnet:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Create starship devnet for osmos and wasm
uses: cosmology-tech/starship-action@v1
uses: cosmology-tech/starship-action@v0.4.4
with:
values: |
chains:
- id: osmosis-1
name: osmosis
numValidators: 1
ports:
rest: 1313
rpc: 26653
resources:
limits:
cpu: "0.2"
memory: "200M"
requests:
cpu: "0.1"
memory: "100M"
- id: wasmd
name: wasmd
numValidators: 1
ports:
rpc: 26659
rest: 1319
resources:
limits:
cpu: "0.2"
memory: "200M"
requests:
cpu: "0.1"
memory: "100M"
config: ./starship-config.yaml
version: v0.2.3 # helm chart version
```
25 changes: 7 additions & 18 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ branding:
icon: anchor

inputs:
values:
description: "Values yaml raw data of filename for helm that define the topology for the devnet"
config:
description: "Path to the config file"
required: true
version:
description: "Version of devnet chart (default: v0.2.3)"
Expand All @@ -15,7 +15,7 @@ inputs:
cli-version:
description: "Version of @starship-ci/cli to use: default: 2.3.0"
required: false
default: "2.4.0"
default: "2.5.0"
kubeconfig:
description: "Kubeconfig file for remote cluster, if set, will be used instead of creating kind cluster"
required: false
Expand Down Expand Up @@ -92,17 +92,6 @@ runs:
echo -e "${{ inputs.kubeconfig }}" > ~/.kube/config
shell: bash

- name: Create values.yaml
run: |
if [[ "${{ inputs.values }}" == *.yaml || "${{ inputs.values }}" == *.yml ]]
then
cp ${{ inputs.values }} ${{ inputs.name }}-values.yaml
else
echo -e "${{ inputs.values }}" > ${{ inputs.name }}-values.yaml
fi
cat ${{ inputs.name }}-values.yaml
shell: bash

- name: Set namespace
id: set-namespace
run: |
Expand Down Expand Up @@ -138,7 +127,7 @@ runs:
yarn starship setup \
--helmName ${{ inputs.name }} \
--helmVersion ${{ inputs.version }} \
--helmFile $GITHUB_WORKSPACE/${{ inputs.name }}-values.yaml \
--helmFile ${{ inputs.config }} \
--helmNamespace ${{ steps.set-namespace.outputs.namespace }} \
--helmChart ${{ inputs.chart }}
shell: bash
Expand All @@ -152,7 +141,7 @@ runs:
yarn starship start \
--helmName ${{ inputs.name }} \
--helmVersion ${{ inputs.version }} \
--helmFile $GITHUB_WORKSPACE/${{ inputs.name }}-values.yaml \
--helmFile ${{ inputs.config }} \
--helmNamespace ${{ steps.set-namespace.outputs.namespace }} \
--helmChart ${{ inputs.chart }}
shell: bash
Expand All @@ -169,7 +158,7 @@ runs:
echo "==================================================="
done
env:
VALUES_FILE: ${{ inputs.name }}-values.yaml
VALUES_FILE: ${{ inputs.config }}
NAMESPACE: ${{ steps.set-namespace.outputs.namespace }}
shell: bash

Expand All @@ -183,7 +172,7 @@ runs:
yarn starship start \
--helmName ${{ inputs.name }} \
--helmVersion ${{ inputs.version }} \
--helmFile $GITHUB_WORKSPACE/${{ inputs.name }}-values.yaml \
--helmFile ${{ inputs.config }} \
--helmNamespace ${{ steps.set-namespace.outputs.namespace }} \
--helmChart ${{ inputs.chart }}
shell: bash

0 comments on commit 731b85f

Please sign in to comment.