Skip to content

Commit 976dcae

Browse files
authored
Merge pull request #31 from netdata/fix/deploy-grafana-plugin
fix: limit deployment options
2 parents 01e1502 + 6236f39 commit 976dcae

File tree

2 files changed

+2
-50
lines changed

2 files changed

+2
-50
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,10 @@ on:
1919
options:
2020
- 'true'
2121
- 'false'
22-
ENV:
23-
required: true
24-
default: 'testing'
25-
type: choice
26-
options:
27-
- testing
28-
- staging
29-
- production
3022

3123
env:
3224
BRANCH: ${{ github.event.inputs.BRANCH || github.ref }}
3325
DEPLOY: ${{ github.event.inputs.DEPLOY || 'false' }}
34-
ENV: ${{ github.event.inputs.ENV || 'testing' }}
3526

3627
jobs:
3728
build:
@@ -96,35 +87,13 @@ jobs:
9687
needs: build
9788
runs-on: ubuntu-latest
9889
steps:
99-
- name: Setup deploy environment
100-
id: deploy_environment
101-
run: |
102-
case $GITHUB_EVENT_NAME in
103-
workflow_dispatch)
104-
echo "::set-output name=ENV::${{ env.ENV }}"
105-
echo "::set-output name=DEPLOY::${{ env.DEPLOY }}"
106-
;;
107-
pull_request)
108-
echo "::set-output name=ENV::staging"
109-
echo "::set-output name=DEPLOY::false"
110-
;;
111-
push)
112-
echo "::set-output name=ENV::staging"
113-
echo "::set-output name=DEPLOY::true"
114-
;;
115-
*)
116-
echo "::set-output name=ENV::staging"
117-
echo "::set-output name=DEPLOY::false"
118-
;;
119-
esac
120-
12190
- name: Update Netdata Infra
122-
if: ${{ steps.deploy_environment.outputs.DEPLOY == 'true' }}
91+
if: github.event_name == 'workflow_dispatch'
12392
uses: benc-uk/workflow-dispatch@v1
12493
with:
12594
token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
12695
repo: ${{ secrets.NETDATA_INFRA_REPO }}
12796
workflow: Netdata Grafana Plugin Deploy
12897
ref: master
129-
inputs: '{"artifact_name": "${{ needs.build.outputs.artifact_name }}", "env": "${{ steps.deploy_environment.outputs.ENV }}", "workflow_run_id": "${{ github.run_id }}"}'
98+
inputs: '{"artifact_name": "${{ needs.build.outputs.artifact_name }}", "env": "testing", "workflow_run_id": "${{ github.run_id }}"}'
13099
continue-on-error: true

.github/workflows/release.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -127,20 +127,3 @@ jobs:
127127
asset_path: ./${{ steps.metadata.outputs.archive-checksum }}
128128
asset_name: ${{ steps.metadata.outputs.archive-checksum }}
129129
asset_content_type: text/plain
130-
131-
outputs:
132-
artifact_name: ${{ steps.metadata.outputs.archive }}
133-
134-
internal-deploy:
135-
needs: release
136-
runs-on: ubuntu-latest
137-
steps:
138-
- name: Update Netdata Infra
139-
uses: benc-uk/workflow-dispatch@v1
140-
with:
141-
token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
142-
repo: ${{ secrets.NETDATA_INFRA_REPO }}
143-
workflow: Netdata Grafana Plugin Deploy
144-
ref: master
145-
inputs: '{"artifact_name": "${{ needs.release.outputs.artifact_name }}", "env": "production", "workflow_run_id": "${{ github.run_id }}"}'
146-
continue-on-error: true

0 commit comments

Comments
 (0)