-
Notifications
You must be signed in to change notification settings - Fork 14
48 lines (41 loc) · 1.53 KB
/
check-url.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
42
43
44
45
46
47
48
name: Periodic URL Check
on:
pull_request:
schedule:
- cron: '*/2 * * * *'
jobs:
set-up:
name: Load user automation choices
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Load environment from YAML
uses: doughepi/[email protected]
with:
files: config_automation.yml # Pass a space-separated list of configuration files. Rightmost files take precedence.
# Delete the branch if this has been run before
- name: Delete branch locally and remotely
run: git push origin --delete preview-${{ github.event.pull_request.number }} || echo "No branch to delete"
- name: Make the branch fresh
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global user.email "[email protected]"
git config --global user.name "jhudsl-robot"
branch_name='preview-${{ github.event.pull_request.number }}'
echo branch doesnt exist
git checkout -b $branch_name || echo branch exists
git push --set-upstream origin $branch_name
outputs:
toggle_url_check_periodically: "${{ env.URL_CHECK_PERIODICALLY }}"
url-check:
name: Check URLs
needs: set-up
if: ${{needs.yaml-check.outputs.toggle_url_check_periodically == 'yes'}}
uses: jhudsl/ottr-reports/.github/workflows/report-maker.yml@main
with:
check_type: urls
error_min: 0
gh_pat: secrets.GH_PAT