-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.22 KB
/
deploy_test.yaml
File metadata and controls
40 lines (37 loc) · 1.22 KB
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
name: Deploy to test
on:
pull_request:
jobs:
build:
uses: ./.github/workflows/build.yaml
secrets: inherit
deploy_test:
name: Deploy to test
needs: build
runs-on: ubuntu-latest
environment:
name: test
url: ${{ steps.get_brancher_hostname.outputs.BRANCHER_URL }}
container: quay.io/hypernode/deploy:3-php8.3-node18
steps:
- uses: actions/checkout@v3
- name: download build artifact
uses: actions/download-artifact@v4
with:
name: deployment-build
path: build/
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- run: mkdir -p $HOME/.ssh
- run: hypernode-deploy deploy test -vvv --reuse-brancher
env:
HYPERNODE_API_TOKEN: ${{ secrets.HYPERNODE_API_TOKEN }}
- name: Get brancher hostname
id: get_brancher_hostname
run: echo "BRANCHER_URL=https://$(jq .hostnames[0] deployment-report.json -r)" >> $GITHUB_OUTPUT
- name: Comment hostname on PR
uses: thollander/actions-comment-pull-request@v1
with:
message: |
Review app is available at ${{ steps.get_brancher_hostname.outputs.BRANCHER_URL }}