-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.39 KB
/
ci-flux.yaml
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
name: "CI for PR (flux)"
on:
pull_request:
branches:
- main
paths:
- 'flux/**'
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
issues: write
pull-requests: write
jobs:
ci:
name: "CI"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Diff files"
id: diff
working-directory: ./test/integration/scripts
shell: bash -x {0}
continue-on-error: true
run: |
echo 'DIFF_LOG<<EOF' >> $GITHUB_ENV
./diff-flux.sh >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: "Create comment for PR (diff flux files between Blue & Green)"
uses: actions/github-script@v7
env:
DIFF: "${{ env.DIFF_LOG }}"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const output = `#### Diff flux files between Blue & Green
<details><summary>Show Diff</summary>
\`\`\`\n
${process.env.DIFF}
\`\`\`
</details>
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})