-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (68 loc) · 2.19 KB
/
Copy pathfwCheckReport.yml
File metadata and controls
72 lines (68 loc) · 2.19 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
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
# Simple workflow for deploying static content to GitHub Pages
name: PUB Flyway Check Report To Github Pages
run-name: PUB ${{ inputs.title }}
on:
# Allows you to run this workflow manually from the Actions tab AND from other actions (fwTaskPushCreateCheck)
workflow_dispatch:
inputs:
title:
description: "Report Title"
required: false
default: "Info and Check Reports"
report_path:
description: "Report Path"
required: false
default: "?"
check_file:
description: "Check File"
required: false
default: "?"
info_file:
description: "Info File"
required: false
default: "?"
env:
REPORT_PATH: ${{ github.WORKSPACE }}/reports # ./reports
INFO_FILENAME: "info"
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
pull-requests: write
id-token: write
jobs:
# Single deploy job since we're just deploying
deploy:
name: Deploy Flyway Check Report To Github Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
env:
GITHUB_TOKEN: ${{ github.token }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire report folder
path: ${{ env.REPORT_PATH }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Set Check Report Available
run: |
echo "checkReport=$( ${{ inputs.check_file }} === '?' )" >> $env:GITHUB_ENV
- name: Echo checkReport
run: |
echo "${{ env.checkReport }}"
- name: Comment Pull Request Info
run: |
gh pr comment --body-file "${{ env.REPORT_PATH }}/${{ inputs.info_file }}"
- name: Comment Pull Request Check Report
if: ${{ env.checkReport == 'True' }}
run: |
gh pr comment --body "FLYWAY Check Report can be found here:${{ inputs.report_path }}${{ inputs.check_file }}"