Skip to content

Commit

Permalink
remove custom values, rename to config, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 committed Jun 13, 2024
1 parent dae792c commit d7615ba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 48 deletions.
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 @@ -91,17 +91,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 @@ -137,7 +126,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 @@ -151,7 +140,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 @@ -168,7 +157,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 @@ -182,7 +171,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 d7615ba

Please sign in to comment.