use label name as trigger for public deployment (#1260)
This commit is contained in:
parent
9ee1a28c8b
commit
20e1d28fb4
1 changed files with 5 additions and 13 deletions
18
.github/workflows/branch-deploy.yml
vendored
18
.github/workflows/branch-deploy.yml
vendored
|
@ -1,20 +1,12 @@
|
||||||
name: DeployFromBranch
|
name: DeployFromBranch
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
public:
|
|
||||||
required: true
|
|
||||||
description: Will this environment be publicly available?
|
|
||||||
default: "no"
|
|
||||||
kafka-ui-password:
|
|
||||||
required: true
|
|
||||||
description: Password that will be used to login to branch env. If the env is not publicly accessible, this password will not be used.
|
|
||||||
default: ""
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types: ['labeled']
|
types: ['labeled']
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: ${{ github.event.label.name == 'status/feature_testing' }}
|
if: ${{ github.event.label.name == 'status/feature_testing' || github.event.label.name == 'status/feature_testing_public' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -92,14 +84,14 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd kafka-ui-infra/aws-infrastructure4eks/argocd/scripts
|
cd kafka-ui-infra/aws-infrastructure4eks/argocd/scripts
|
||||||
echo "Branch:${{ needs.build.outputs.tag }}"
|
echo "Branch:${{ needs.build.outputs.tag }}"
|
||||||
./kafka-ui-deployment-from-branch.sh ${{ needs.build.outputs.tag }} ${{ github.event.inputs.public }} ${{ github.event.inputs.kafka-ui-password }}
|
./kafka-ui-deployment-from-branch.sh ${{ needs.build.outputs.tag }} ${{ github.event.label.name }} ${{ secrets.FEATURE_TESTING_UI_PASSWORD }}
|
||||||
git config --global user.email "kafka-ui-infra@provectus.com"
|
git config --global user.email "kafka-ui-infra@provectus.com"
|
||||||
git config --global user.name "kafka-ui-infra"
|
git config --global user.name "kafka-ui-infra"
|
||||||
git add ../kafka-ui-from-branch/
|
git add ../kafka-ui-from-branch/
|
||||||
git commit -m "added env:${{ needs.build.outputs.deploy }}" && git push || true
|
git commit -m "added env:${{ needs.build.outputs.deploy }}" && git push || true
|
||||||
|
|
||||||
- name: make comment with private deployment link
|
- name: make comment with private deployment link
|
||||||
if: ${{ github.event.inputs.public == 'no' }}
|
if: ${{ github.event.label.name == 'status/feature_testing' }}
|
||||||
uses: peter-evans/create-or-update-comment@v1.4.5
|
uses: peter-evans/create-or-update-comment@v1.4.5
|
||||||
with:
|
with:
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
@ -107,7 +99,7 @@ jobs:
|
||||||
Custom deployment will be available at http://${{ needs.build.outputs.tag }}.internal.kafka-ui.provectus.io
|
Custom deployment will be available at http://${{ needs.build.outputs.tag }}.internal.kafka-ui.provectus.io
|
||||||
|
|
||||||
- name: make comment with public deployment link
|
- name: make comment with public deployment link
|
||||||
if: ${{ github.event.inputs.public == 'yes' }}
|
if: ${{ github.event.label.name == 'status/feature_testing_public' }}
|
||||||
uses: peter-evans/create-or-update-comment@v1.4.5
|
uses: peter-evans/create-or-update-comment@v1.4.5
|
||||||
with:
|
with:
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue