Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ assignees: swimmwatch

---

---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: swimmwatch

---

<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior
Expand All @@ -38,11 +29,3 @@ assignees: swimmwatch
## Context (Environment)
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

<!--- Provide a general summary of the issue in the Title above -->

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->

## Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->
29 changes: 0 additions & 29 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
THIS PROJECT IS IN MAINTENANCE MODE. We accept pull-requests for Bug Fixes **ONLY**. NO NEW FEATURES ACCEPTED!
THIS PROJECT IS IN MAINTENANCE MODE. We accept pull requests for bug fixes **only**. New features are not accepted.

<!--- Provide a general summary of your changes in the Title above -->

Expand All @@ -7,7 +7,6 @@ THIS PROJECT IS IN MAINTENANCE MODE. We accept pull-requests for Bug Fixes **ONL

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

Expand Down
85 changes: 85 additions & 0 deletions .github/actions/webchanges-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: "Web changes detector"
author: "Dmitry Vasiliev"
description: "Detect changes in web pages and notify via GitHub Actions"
branding:
icon: "check-circle"
color: "blue"

inputs:
config:
description: "Configuration for the web changes detector"
required: true
jobs:
description: "List of jobs to run for web changes detection"
required: true

runs:
using: "composite"
steps:
- name: "Set up environment"
shell: bash
run: |
echo "WEBCHANGES_ACTION_DIR=${{ runner.temp }}/webchanges-action" >> "$GITHUB_ENV"
echo "CONFIG_PATH=${{ runner.temp }}/webchanges-action/config.yaml" >> "$GITHUB_ENV"
echo "JOBS_PATH=${{ runner.temp }}/webchanges-action/jobs.yaml" >> "$GITHUB_ENV"
echo "SNAPSHOTS_DIR=${{ runner.temp }}/webchanges-action-cache" >> "$GITHUB_ENV"
echo "SNAPSHOTS_DB=${{ runner.temp }}/webchanges-action-cache/snapshots.db" >> "$GITHUB_ENV"
echo "HOOKS_PATH=${{ github.action_path }}/hooks.py" >> "$GITHUB_ENV"
echo "WEBCHANGES_VERSION=3.36.1" >> "$GITHUB_ENV"
echo "PYTHON_VERSION=3.13" >> "$GITHUB_ENV"
- name: "Create work directories"
shell: bash
run: |
mkdir -p "$WEBCHANGES_ACTION_DIR" "$SNAPSHOTS_DIR"
- name: "Write configs to files"
shell: bash
run: |
cat > "$CONFIG_PATH" <<'WEBCHANGES_CONFIG'
${{ inputs.config }}
WEBCHANGES_CONFIG
cat > "$JOBS_PATH" <<'WEBCHANGES_JOBS'
${{ inputs.jobs }}
WEBCHANGES_JOBS
- name: "Setup Python"
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
- name: "Install webchanges package"
shell: bash
run: |
pip install webchanges==${{ env.WEBCHANGES_VERSION }}
- name: "Compute cache key"
shell: bash
run: |
CONFIG_HASH=$(sha256sum "$CONFIG_PATH" "$JOBS_PATH" | sha256sum | awk '{ print $1 }')
echo "CACHE_PREFIX=${{ runner.os }}-webchanges-${CONFIG_HASH}-" >> "$GITHUB_ENV"
echo "CACHE_KEY=${{ runner.os }}-webchanges-${CONFIG_HASH}-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_ENV"
- name: "Restore cache snapshots database"
uses: actions/cache/restore@v5
with:
path: "${{ env.SNAPSHOTS_DIR }}"
key: "${{ env.CACHE_KEY }}"
restore-keys: |
${{ env.CACHE_PREFIX }}
- name: "Check if snapshots database exists"
shell: bash
run: |
if [ ! -f "$SNAPSHOTS_DB" ]; then
echo "No snapshots database found, creating a new one."
else
echo "Snapshots database found, using existing one."
fi
- name: "Secure hooks file permissions"
shell: bash
run: |
chmod go-w "$HOOKS_PATH" "$(dirname "$HOOKS_PATH")"
- name: "Run web changes detection"
shell: bash
run: |
webchanges --config "$CONFIG_PATH" --jobs "$JOBS_PATH" --hooks "$HOOKS_PATH" --database "$SNAPSHOTS_DB"
- name: "Cache snapshots database"
uses: actions/cache/save@v5
with:
path: "${{ env.SNAPSHOTS_DIR }}"
key: "${{ env.CACHE_KEY }}"
Loading
Loading