Skip to content

Commit 42e8e6c

Browse files
committed
consolidate go + yara-x version definitions
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
1 parent ef0701b commit 42e8e6c

5 files changed

Lines changed: 22 additions & 12 deletions

File tree

.github/workflows/codeql.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
env:
1414
CODEQL_EXTRACTOR_GO_BUILD_TRACING: "on"
15-
YARA_X_RELEASE: "v1.13.0"
15+
YARA_X_RELEASE: "1.13.0"
1616

1717
permissions: {}
1818

@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
3636
with:
3737
path: yara-x-install
38-
key: yara-x-capi-${{ env.YARA_X_RELEASE }}-${{ runner.os }}
38+
key: yara-x-capi-v${{ env.YARA_X_RELEASE }}-${{ runner.os }}
3939
- name: Checkout virusTotal/yara-x
4040
if: steps.yara-x-capi.outputs.cache-hit != 'true'
4141
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -44,7 +44,7 @@ jobs:
4444
fetch-tags: true
4545
repository: virusTotal/yara-x
4646
path: yara-x
47-
ref: refs/tags/${{ env.YARA_X_RELEASE }}
47+
ref: refs/tags/v${{ env.YARA_X_RELEASE }}
4848
- name: Install Rust for yara-x-capi
4949
if: steps.yara-x-capi.outputs.cache-hit != 'true'
5050
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
@@ -57,7 +57,7 @@ jobs:
5757
path: |
5858
~/.cargo/registry/
5959
~/.cargo/git/
60-
key: rust-cargo-${{ env.YARA_X_RELEASE }}-${{ runner.os }}
60+
key: rust-cargo-v${{ env.YARA_X_RELEASE }}-${{ runner.os }}
6161
restore-keys: rust-cargo-
6262
- name: Build yara-x-capi
6363
if: steps.yara-x-capi.outputs.cache-hit != 'true'

.github/workflows/fuzz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ on:
2929
- "60m"
3030
- "180m"
3131

32+
env:
33+
GO_RELEASE: "go-1.26"
34+
YARA_X_RELEASE: "1.13.0"
35+
3236
permissions: {}
3337

3438
jobs:
@@ -117,7 +121,7 @@ jobs:
117121
- name: Install dependencies
118122
run: |
119123
apk update
120-
apk add curl findutils git gnutar go-1.26 nodejs upx xz yara-x~1.13.0
124+
apk add curl findutils git gnutar ${{ env.GO_RELEASE }} nodejs upx xz yara-x~${{ env.YARA_X_RELEASE }}
121125
122126
- name: Checkout code
123127
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/go-tests.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
branches:
1212
- "main"
1313

14+
env:
15+
GO_RELEASE: "go-1.26"
16+
YARA_X_RELEASE: "1.13.0"
17+
1418
permissions: {}
1519

1620
jobs:
@@ -37,7 +41,7 @@ jobs:
3741
- name: Install dependencies
3842
run: |
3943
apk update
40-
apk add curl findutils git gnutar go-1.26 nodejs upx xz yara-x~1.13.0
44+
apk add curl findutils git gnutar ${{ env.GO_RELEASE }} nodejs upx xz yara-x~${{ env.YARA_X_RELEASE }}
4145
4246
- name: Checkout code
4347
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -88,7 +92,7 @@ jobs:
8892
- name: Install dependencies
8993
run: |
9094
apk update
91-
apk add curl findutils git gnutar go-1.26 nodejs upx xz yara-x~1.13.0
95+
apk add curl findutils git gnutar ${{ env.GO_RELEASE }} nodejs upx xz yara-x~${{ env.YARA_X_RELEASE }}
9296
9397
- name: Checkout code
9498
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/release.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ name: Cut Release
66
on:
77
workflow_dispatch:
88

9-
permissions:
10-
contents: read
9+
permissions: {}
1110

1211
env:
1312
VERSION_FILE: pkg/version/version.go

.github/workflows/third-party.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ on:
88
schedule:
99
- cron: "0 */12 * * *"
1010

11-
permissions:
12-
contents: read
11+
env:
12+
GO_RELEASE: "go-1.26"
13+
YARA_X_RELEASE: "1.13.0"
14+
15+
permissions: {}
1316

1417
jobs:
1518
update:
@@ -37,7 +40,7 @@ jobs:
3740
- name: Install dependencies
3841
run: |
3942
apk update
40-
apk add bash curl findutils gh git gnutar go-1.26 nodejs perl upx xz yara-x~1.13.0
43+
apk add bash curl findutils gh git gnutar ${{ env.GO_RELEASE }} nodejs perl upx xz yara-x~${{ env.YARA_X_RELEASE }}
4144
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4245
- name: Trust repository
4346
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"

0 commit comments

Comments
 (0)