Skip to content

Commit 6444a8e

Browse files
PB-1877 Add test link to PR
This is adapted from the web-mapviewer. We only have feature branches and a master branch. So no conditionals needed. The preview link points to something like https://sys-docs.dev.bgdi.ch/preview/feat-PB-1877-my-title/index.html which points to S3 bucket `s3://tech-docs-dev-swisstopo`. The corresponding CodeBuild project, S3 bucket and CloudFront configs are set up in geoadmin/infra-terraform-bgdi#1179.
1 parent b87b065 commit 6444a8e

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Create test link on PR creation
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- reopened
7+
- synchronize
8+
- edited
9+
jobs:
10+
update_pr:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Create/update test link on DEV
14+
uses: tzkhan/pr-update-action@v2
15+
with:
16+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
17+
head-branch-regex: '.+'
18+
body-template: |
19+
20+
[Test link](https://sys-docs.dev.bgdi.ch/preview/%headbranch%/index.html)
21+
body-update-action: 'suffix'
22+
body-uppercase-head-match: false

0 commit comments

Comments
 (0)