-
Notifications
You must be signed in to change notification settings - Fork 14.3k
50 lines (46 loc) · 1.32 KB
/
pr-deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: PR Deployment
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
uses: ./.github/workflows/build.yml
name: Build
secrets: inherit
permissions:
checks: write
actions: write
contents: write
packages: read
issues: read
pull-requests: write
labels:
runs-on: ubuntu-latest
name: Add Labels
steps:
- name: Add labels
id: add_labels
run: |
echo "feature_name=superset-pr-${{ github.event.pull_request.number }}" | sed 's:\.:-:g' >> $GITHUB_OUTPUT
outputs:
feature_name: ${{ steps.add_labels.outputs.feature_name }}
deploy:
name: Deploy to Feature Environment
needs: [labels, build]
uses: webgains/github-workflows/.github/workflows/deploy-service-to-environment.yml@WI-5868-allow-service-deploy-workflow-to-use-any-repositor
secrets: inherit
with:
environment: feature
name: ${{ needs.labels.outputs.feature_name }}
stack: ${{ needs.labels.outputs.feature_name }}
service: superset
component: service
override: |
{
"namespace": "${{ needs.labels.outputs.feature_name }}",
"supersetImageTag": "${{ needs.build.outputs.tag_hash }}"
}
permissions:
contents: read
deployments: write
id-token: write