-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (34 loc) · 1.3 KB
/
branch-deploy.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
name: branch-deploy
on:
issue_comment:
types: [created]
permissions: write-all
jobs:
rubocop:
name: runner / rspec
runs-on: ubuntu-latest
steps:
- name: branch-deploy
id: branch-deploy
uses: GrantBirki/branch-deploy@35cce77afd4fafcda2d28c861fc85cddbcec67f0 # pin@v1.5.0
# Check out the ref from the output of the IssueOps command
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3.0.2
with:
ref: ${{ steps.branch-deploy.outputs.ref }}
- uses: ruby/setup-ruby@cd4241788aec4fdcd3325da7068efa9b62a017af
with:
ruby-version: 2.7.5
bundler-cache: true
- name: bootstrap
run: script/bootstrap
# Here we run a deploy. It is "gated" by the IssueOps logic and will only run if the outputs from our branch-deploy step indicate that the workflow should continue
- name: deploy
if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop != 'true' }}
run: |
set -o pipefail
script/deploy | tee deploy.out
MSG=$(cat deploy.out)
MSG="\`\`\`output\n${MSG}\n\`\`\`"
echo 'DEPLOY_MESSAGE<<EOF' >> $GITHUB_ENV
echo "$MSG" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV