-
Notifications
You must be signed in to change notification settings - Fork 21
61 lines (55 loc) · 1.77 KB
/
release.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
51
52
53
54
55
56
57
58
59
60
61
---
name: Release
on:
workflow_run:
types:
- completed
workflows:
- "ci"
jobs:
get-tag:
name: Get tag
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.head_branch, 'release/') }}
outputs:
tag: ${{ steps.get-tag-step.outputs.tag }}
steps:
- name: Get tag
run: |
branch=${{github.event.workflow_run.head_branch}}
echo tag=${branch#release/} >> $GITHUB_OUTPUT
id: get-tag-step
check-gomod-deps:
needs: get-tag
uses: networkservicemesh/.github/.github/workflows/check-gomod-deps.yaml@main
with:
tag: ${{ needs.get-tag.outputs.tag }}
create-release:
needs: [get-tag, check-gomod-deps]
uses: networkservicemesh/.github/.github/workflows/release.yaml@main
secrets:
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
docker:
needs: [get-tag, check-gomod-deps]
uses: networkservicemesh/.github/.github/workflows/docker-release.yaml@main
with:
tag: ${{ needs.get-tag.outputs.tag }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
check-branch:
name: Check release branch in deployments-k8s
needs: [get-tag, create-release]
uses: networkservicemesh/.github/.github/workflows/check-release-branch.yaml@main
with:
tag: ${{ needs.get-tag.outputs.tag }}
secrets:
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
update-deployments-k8s:
name: Update deployments-k8s
needs: [get-tag, check-branch]
if: ${{ github.repository != 'networkservicemesh/cmd-template' }}
uses: networkservicemesh/.github/.github/workflows/release-deployments.yaml@main
with:
tag: ${{ needs.get-tag.outputs.tag }}
secrets:
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}