我目前正在使用foo-software/lighthouse-check-action自动进行审核。但由于urls
必须是硬编码的,所以当希望仅对提交中修改的页面进行审核并根据这些页面失败时,它就不那么有用。
有没有办法实现上述功能?我查看了一些操作,例如actions/get-changed-files,但我无法使其工作。我还查看了GitHub事件和引用文档,但无法找到相关信息。
我目前正在使用foo-software/lighthouse-check-action自动进行审核。但由于urls
必须是硬编码的,所以当希望仅对提交中修改的页面进行审核并根据这些页面失败时,它就不那么有用。
有没有办法实现上述功能?我查看了一些操作,例如actions/get-changed-files,但我无法使其工作。我还查看了GitHub事件和引用文档,但无法找到相关信息。
lots0logs/gh-action-get-changed-files操作目前由于此问题而无法使用。请看一下jitterbit/get-changed-files操作。对我来说它完美地工作:
name: Test
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.1.0
- uses: jitterbit/get-changed-files@v1
id: abc
with:
format: space-delimited
token: ${{ secrets.GITHUB_TOKEN }}
- name: Printing
run: |
echo "All:"
echo "${{ steps.abc.outputs.all }}"
echo "Added:"
echo "${{ steps.abc.outputs.added }}"
echo "Removed:"
echo "${{ steps.abc.outputs.removed }}"
echo "Renamed:"
echo "${{ steps.abc.outputs.renamed }}"
echo "Modified:"
echo "${{ steps.abc.outputs.modified }}"
echo "Added+Modified:"
echo "${{ steps.abc.outputs.added_modified }}"
2020-05-15T13:47:15.5267496Z All:
2020-05-15T13:47:15.5268424Z .github/workflows/test.yml .tidy-renamed2 Test.ts hello.py
2020-05-15T13:47:15.5268537Z Added:
2020-05-15T13:47:15.5268609Z hello.py
2020-05-15T13:47:15.5268697Z Removed:
2020-05-15T13:47:15.5268787Z Test.ts
2020-05-15T13:47:15.5268880Z Renamed:
2020-05-15T13:47:15.5269260Z .tidy-renamed2
2020-05-15T13:47:15.5269357Z Modified:
2020-05-15T13:47:15.5269450Z .github/workflows/test.yml
2020-05-15T13:47:15.5269547Z Added+Modified:
2020-05-15T13:47:15.5269625Z .github/workflows/test.yml hello.py
2020-05-15T13:47:15.5306656Z Post job cleanup.
在尝试了上述两个插件和其他一些插件后,我决定采用以下方法:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: (CI) Dependencies update check
run: |
current_commit=`git log -n 1 --pretty=format:%H`
echo $current_commit
last_deps_mod_commit=`git log -n 1 --pretty=format:%H -- composer.json`
echo $last_deps_mod_commit
if [ $current_commit == $last_deps_mod_commit ]; then echo USE_LOCK=0 > ci.conf; else echo USE_LOCK=1 > ci.conf; fi