-
Notifications
You must be signed in to change notification settings - Fork 14
41 lines (36 loc) · 1.16 KB
/
zip-pr.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
name: Build zip from PR
on:
pull_request:
branches:
- 'master'
jobs:
zip-rc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-plugin
with:
generate_zip: 'true'
- name: Upload zip
uses: Dylan700/sftp-upload-action@latest
with:
server: ${{ secrets.CBZIPUPLOAD_HOST }}
username: ${{ secrets.CBZIPUPLOAD_USER }}
key: ${{ secrets.CBZIPUPLOAD_KEY }}
uploads: |
./ => ./cbzip/${{ github.event.number }}/
ignore: |
!commonsbooking.zip
- name: Comment on PR
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let fs = require('fs');
let issue_number = ${{ github.event.number }};
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '[Download zip](http://cbzip.v2202011131270131895.happysrv.de/${{ github.event.number}}/commonsbooking.zip'
});