@@ -6,12 +6,18 @@ concurrency:
6
6
7
7
on :
8
8
pull_request :
9
+ branches : [ main, master ]
9
10
push :
11
+ branches : [ main, master ]
10
12
schedule :
11
- - cron : ' 0 1 * * *'
13
+ - cron : ' 0 1 * * *'
14
+
15
+ permissions :
16
+ contents : read
12
17
13
18
jobs :
14
19
specs :
20
+ timeout-minutes : 30
15
21
runs-on : ubuntu-latest
16
22
needs : diffend
17
23
strategy :
@@ -26,13 +32,15 @@ jobs:
26
32
- ruby : ' 3.3'
27
33
coverage : ' true'
28
34
steps :
29
- - uses : actions/checkout@v4
35
+ - uses : actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
36
+ with :
37
+ fetch-depth : 0
30
38
31
39
- name : Install package dependencies
32
40
run : " [ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
33
41
34
42
- name : Set up Ruby
35
- uses : ruby/setup-ruby@v1
43
+ uses : ruby/setup-ruby@f0a4d6bddd8e71bd3268c611f7ea6f41dce6d7fd
36
44
with :
37
45
ruby-version : ${{matrix.ruby}}
38
46
bundler : ' latest'
@@ -41,24 +49,24 @@ jobs:
41
49
run : |
42
50
gem install bundler --no-document
43
51
gem update --system --no-document
44
-
45
52
bundle config set without 'tools benchmarks docs'
46
53
47
54
- name : Bundle install
48
55
run : |
49
56
bundle install --jobs 4 --retry 3
50
57
51
58
diffend :
59
+ timeout-minutes : 5
52
60
runs-on : ubuntu-latest
53
61
strategy :
54
62
fail-fast : false
55
63
steps :
56
- - uses : actions/checkout@v4
64
+ - uses : actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
57
65
with :
58
66
fetch-depth : 0
59
67
60
68
- name : Set up Ruby
61
- uses : ruby/setup-ruby@v1
69
+ uses : ruby/setup-ruby@f0a4d6bddd8e71bd3268c611f7ea6f41dce6d7fd
62
70
with :
63
71
ruby-version : 3.3
64
72
@@ -72,12 +80,28 @@ jobs:
72
80
run : bundle secure
73
81
74
82
coditsu :
83
+ timeout-minutes : 5
75
84
runs-on : ubuntu-latest
76
85
strategy :
77
86
fail-fast : false
78
87
steps :
79
- - uses : actions/checkout@v4
88
+ - uses : actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
80
89
with :
81
90
fetch-depth : 0
91
+
92
+ - name : Download Coditsu script
93
+ run : |
94
+ curl -sSL https://api.coditsu.io/run/ci -o coditsu_script.sh
95
+ chmod +x coditsu_script.sh
96
+
97
+ - name : Verify Coditsu script checksum
98
+ run : |
99
+ EXPECTED_SHA256="0aecc5aa010f53fca264548a41467a2b0a1208d750ce1da3e98a217304cacbbc"
100
+ ACTUAL_SHA256=$(sha256sum coditsu_script.sh | awk '{ print $1 }')
101
+ if [ "$ACTUAL_SHA256" != "$EXPECTED_SHA256" ]; then
102
+ echo "::error::Checksum verification failed. Expected $EXPECTED_SHA256 but got $ACTUAL_SHA256."
103
+ exit 1
104
+ fi
105
+
82
106
- name : Run Coditsu
83
- run : \curl -sSL https://api.coditsu.io/run/ci | bash
107
+ run : ./coditsu_script.sh
0 commit comments