File tree Expand file tree Collapse file tree 6 files changed +1682
-13
lines changed Expand file tree Collapse file tree 6 files changed +1682
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : Weekly Ruby Script Runner
2
+
3
+ on :
4
+ # for testing purposes
5
+ push :
6
+ branches :
7
+ - main
8
+ schedule :
9
+ - cron : ' 0 0 * * 0' # Runs every weekend
10
+
11
+ jobs :
12
+ run-scripts :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout repository
16
+
17
+
18
+ - name : Set up Ruby
19
+ uses : ruby/setup-ruby@v1
20
+ with :
21
+ ruby-version : 3.3.4
22
+
23
+ - name : Install mechanize gem
24
+ run : |
25
+ gem install mechanize;
26
+
27
+ - name : Run new.rb script
28
+ id : run-new-rb-script
29
+ run : |
30
+ ruby seek/new.rb;
31
+ exit_code=$?;
32
+ echo "new.rb exit code: $exit_code";
33
+ echo "exit_code=$exit_code" >> $GITHUB_ENV;
34
+ if [ $exit_code -eq 0 ]; then
35
+ echo "new.rb succeeded.";
36
+ else
37
+ echo "new.rb failed with exit code $exit_code.";
38
+ exit $exit_code; # Exit with the last exit code
39
+ fi;
40
+
41
+ - name : Commit and push changes if any
42
+ if : env.exit_code == '0'
43
+ run : |
44
+ git config --global user.name "github-actions[bot]";
45
+ git config --global user.email "github-actions[bot]@users.noreply.github.com";
46
+ git add seek/job_ind.json;
47
+ if git diff-index --quiet HEAD; then
48
+ echo "No changes to commit.";
49
+ else
50
+ git commit -m "Update seek/job_ind.json";
51
+ git push origin main;
52
+ fi;
Original file line number Diff line number Diff line change 27
27
- id : debug-statements
28
28
- id : detect-private-key
29
29
- id : end-of-file-fixer
30
- exclude : ^charts/assets/.*$|^charts/lang/README\.de\.md$|^charts/log\.txt$|^charts/README\.md$|^docs/assets/js/.*$|^docs/assets/games/.*$|rubycritic/.*$
30
+ 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 $
31
31
- id : file-contents-sorter
32
32
files : ^requirements.txt$
33
33
args : [--unique]
@@ -101,7 +101,7 @@ repos:
101
101
hooks :
102
102
- id : codespell
103
103
entry : codespell -I codespell.txt ./doc/source
104
- 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/.*$
104
+ 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$
105
105
# - repo: https://github.com/syntaqx/git-hooks
106
106
# rev: v0.0.16
107
107
# hooks:
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ Metrics/AbcSize:
33
33
Metrics/BlockLength :
34
34
Max : 45
35
35
36
+ Metrics/ClassLength :
37
+ Max : 120
38
+
36
39
Metrics/CyclomaticComplexity :
37
40
Enabled : false
38
41
You can’t perform that action at this time.
0 commit comments