Skip to content

Commit

Permalink
fix: correct deployment for beta channel
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanue committed Oct 28, 2023
1 parent f9b366a commit b65fdea
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Install kustomize
run: curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
- name: Load channel
run: echo ::set-output name=CHANNEL::$(echo `node -e ' process.env.GITHUB_REF_NAME === "master" ? console.log("") :console.log(require("./.releaserc.json").branches.reduce((a,c) => a || c.name === process.env.GITHUB_REF_NAME && "-" + c.channel, false))'`)
id: channel
- name: Print channel
run: echo ${{ steps.channel.outputs.CHANNEL }}
# - name: Load channel
# run: echo ::set-output name=CHANNEL::$(echo `node -e ' process.env.GITHUB_REF_NAME === "master" ? console.log("") :console.log(require("./.releaserc.json").branches.reduce((a,c) => a || c.name === process.env.GITHUB_REF_NAME && "-" + c.channel, false))'`)
# id: channel
# - name: Print channel
# run: echo ${{ steps.channel.outputs.CHANNEL }}
- name: Run kustomize
run: (cd deployment${{ steps.channel.outputs.CHANNEL}}/base && ../../kustomize edit set image greenstand/${{ github.event.repository.name }}:${{github.event.inputs.version}})
run: (cd deployment/base && ../../kustomize edit set image greenstand/${{ github.event.repository.name }}:${{github.event.inputs.version}})
- name: Resolve the secrets name
run: echo ::set-output name=SECRET_KEY::$( echo `node -e 'console.log({dev:"DEV_DIGITALOCEAN_TOKEN",prod:"DIGITALOCEAN_PRODUCTION_TOKEN",test:"TEST_DIGITALOCEAN_TOKEN"}[process.env.ENV_TO_DEPLOY])'`)
id: do_secrets_name
Expand Down Expand Up @@ -81,4 +81,4 @@ jobs:
- name: Print overlay folder
run: echo ${{ steps.overlay_folder.outputs.OVERLAY_FOLDER }}
- name: Update kubernetes resources
run: kustomize build deployment${{ steps.channel.outputs.CHANNEL}}/overlays/${{ steps.overlay_folder.outputs.OVERLAY_FOLDER}} | kubectl apply -n ${{ secrets.K8S_NAMESPACE }} --wait -f -
run: kustomize build deployment/overlays/${{ steps.overlay_folder.outputs.OVERLAY_FOLDER}} | kubectl apply -n ${{ secrets.K8S_NAMESPACE }} --wait -f -

0 comments on commit b65fdea

Please sign in to comment.