Skip to content

[WIP] Trigger mirror update test #104

[WIP] Trigger mirror update test

[WIP] Trigger mirror update test #104

name: Mirror update notification
on:
push:
# branches:
# - master
paths:
- backend_modules/libvirt/base/main.tf
jobs:
Check-changed-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Find modified images
run: |
echo "DIFF<<EOF" >> $GITHUB_ENV
git diff -p -U0 --no-color --diff-filter=M -G"\{var\.mirror\}" \
${{ github.event.push.before }}..${{ github.event.push.after }} \
-- backend_modules/libvirt/base/main.tf | \
grep "^[+-] " | sed 's/^[+-]\s*\([^ ]*\).*$/ - `\1`/' | uniq >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Comment on the pull request
if: env.DIFF
uses: peter-evans/commit-comment@v1
with:
body: |
This pull request modifies the URLs of the following images:
${{ env.DIFF }}
Please consider updating the CI and BV mirror configurations accordingly.