Skip to content

Commit

Permalink
Merge branch 'main' into fix-markdown-link-action-fail
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton authored Oct 8, 2024
2 parents 61fadf8 + c4aca9b commit 580c236
Show file tree
Hide file tree
Showing 7 changed files with 1,684 additions and 15 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/weekly_run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Weekly Ruby Script Runner

on:
# for testing purposes
push:
branches:
- main
schedule:
- cron: '0 0 * * 0' # Runs every weekend

jobs:
run-scripts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.1

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4

- name: Install mechanize gem
run: |
gem install mechanize;
- name: Run new.rb script
id: run-new-rb-script
run: |
ruby seek/new.rb;
exit_code=$?;
echo "new.rb exit code: $exit_code";
echo "exit_code=$exit_code" >> $GITHUB_ENV;
if [ $exit_code -eq 0 ]; then
echo "new.rb succeeded.";
else
echo "new.rb failed with exit code $exit_code.";
exit $exit_code; # Exit with the last exit code
fi;
- name: Commit and push changes if any
if: env.exit_code == '0'
run: |
git config --global user.name "github-actions[bot]";
git config --global user.email "github-actions[bot]@users.noreply.github.com";
git add seek/job_ind.json;
if git diff-index --quiet HEAD; then
echo "No changes to commit.";
else
git commit -m "Update seek/job_ind.json";
git push origin main;
fi;
4 changes: 2 additions & 2 deletions .github/workflows/wrangler-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Deploy
uses: cloudflare/wrangler-action@v3.8.0
uses: cloudflare/wrangler-action@v3.9.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: 'workers.dev/magic'
Expand All @@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Deploy
uses: cloudflare/wrangler-action@v3.8.0
uses: cloudflare/wrangler-action@v3.9.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: 'workers.dev/preston'
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
exclude: ^charts/assets/.*$|^charts/lang/README\.de\.md$|^charts/log\.txt$|^charts/README\.md$|^docs/assets/js/.*$|^docs/assets/games/.*$|rubycritic/.*$
exclude: ^charts/assets/.*$|^charts/lang/README\.de\.md$|^charts/log\.txt$|^charts/README\.md$|^docs/assets/js/.*$|^docs/assets/games/.*$|^rubycritic/.*$|^seek/job_ind\.json$
- id: file-contents-sorter
files: ^requirements.txt$
args: [--unique]
Expand Down Expand Up @@ -110,7 +110,7 @@ repos:
hooks:
- id: codespell
entry: codespell -I codespell.txt ./doc/source
exclude: ^assets/.*$|^charts/.*$|^docs/assets/.*$|^eclipse-cheatsheets-to-dita-to-pdf/.*$|^Gemfile\.lock$|^go\.sum$|^go\.work\.sum$|^logorama/.*$|^rubycritic/.*$|^ruby-eclipse-cheatsheets-to-dita/.*$|^tests/spelling/.*$
exclude: ^assets/.*$|^charts/.*$|^docs/assets/.*$|^eclipse-cheatsheets-to-dita-to-pdf/.*$|^Gemfile\.lock$|^go\.sum$|^go\.work\.sum$|^logorama/.*$|^rubycritic/.*$|^ruby-eclipse-cheatsheets-to-dita/.*$|^tests/spelling/.*$|^seek/job_ind\.json$
# - repo: https://github.com/syntaqx/git-hooks
# rev: v0.0.16
# hooks:
Expand Down
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Metrics/AbcSize:
Metrics/BlockLength:
Max: 45

Metrics/ClassLength:
Max: 120

Metrics/CyclomaticComplexity:
Enabled: false

Expand Down
Loading

0 comments on commit 580c236

Please sign in to comment.