-
Notifications
You must be signed in to change notification settings - Fork 22
73 lines (70 loc) · 2.06 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
62
63
64
65
66
67
68
69
70
71
72
73
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version (excl. prefix v)'
required: true
type: string
sha:
description: 'SHA (long version; 40 chars)'
required: true
type: string
branch:
description: 'Branch'
type: string
default: main
jobs:
staging:
runs-on: ubuntu-latest
steps:
- name: Setup bob
uses: hashicorp/action-setup-bob@01076d9cc869139ac97693d0869f0e80a666cb3b # v2
with:
github-token:
${{ secrets.BOB_GITHUB_TOKEN }}
- name: Promote to staging
env:
BOB_GITHUB_TOKEN: ${{ secrets.BOB_GITHUB_TOKEN }}
VERSION: ${{ github.event.inputs.version }}
SHA: ${{ github.event.inputs.sha }}
BRANCH: main
ENVIRONMENT: staging
run: |
bob trigger-promotion \
--product-name=hc-install \
--environment=hc-install-oss \
--org=hashicorp \
--repo=hc-install \
--slack-channel=C01QDH3Q37W \
--product-version=$VERSION \
--sha=$SHA \
--branch=$BRANCH \
$ENVIRONMENT
production:
runs-on: ubuntu-latest
needs: staging
steps:
- name: Setup bob
uses: hashicorp/action-setup-bob@01076d9cc869139ac97693d0869f0e80a666cb3b # v2
with:
github-token:
${{ secrets.BOB_GITHUB_TOKEN }}
- name: Promote to production
env:
BOB_GITHUB_TOKEN: ${{ secrets.BOB_GITHUB_TOKEN }}
VERSION: ${{ github.event.inputs.version }}
SHA: ${{ github.event.inputs.sha }}
BRANCH: main
ENVIRONMENT: production
run: |
bob trigger-promotion \
--product-name=hc-install \
--environment=hc-install-oss \
--org=hashicorp \
--repo=hc-install \
--slack-channel=C01QDH3Q37W \
--product-version=$VERSION \
--sha=$SHA \
--branch=$BRANCH \
$ENVIRONMENT