-
Notifications
You must be signed in to change notification settings - Fork 22
43 lines (37 loc) · 1.36 KB
/
create-github-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
name: create-github-release
on:
workflow_dispatch:
repository_dispatch:
types:
- create-github-release
jobs:
build:
runs-on: ubuntu-latest
env:
working-directory: ./modules
steps:
- name: Repo Clone
run: |
git clone https://${{ secrets.GIT_TOKEN }}@github.com/crowdbotics/modules.git
- name: Clone Reusable Actions Repo
run: |
git clone -b master https://${{ secrets.GIT_TOKEN }}@github.com/crowdbotics/github-actions.git
- name: Checkout branch
working-directory: ${{ env.working-directory }}
run: |
if [ ${{ github.event.client_payload.release_branch }} == "master" ]; then
echo "branch: ${{ github.event.client_payload.release_branch }}"
git checkout ${{ github.event.client_payload.release_branch }}
else
echo "manual deployment"
echo "branch: ${GITHUB_REF_NAME}"
git checkout ${GITHUB_REF_NAME}
fi
- name: Run Release Workflow
uses: ./github-actions/create-github-release
with:
working-directory: ${{ env.working-directory }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
release_branch: ${{ github.event.client_payload.release_branch }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}