Skip to content

Commit 218947b

Browse files
committed
warn if latest release and rules are not compatible
1 parent 1fd0d8e commit 218947b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master, 'v[0-9]+' ]
5+
branches: [ master ]
66
pull_request:
7-
branches: [ master, 'v[0-9]+' ]
7+
branches: [ master ]
88
# trigger workflow on edited as well (opened and synchronize are default)
99
types: [opened, edited, synchronize]
1010
workflow_dispatch:
@@ -95,30 +95,25 @@ jobs:
9595
done
9696
continue-on-error: true
9797

98-
# On update of version branch, ensure that branch rules are compatible with latest respective release
99-
# assume we only update the branch that corresponds to the latest release
98+
# warn if new rules are not compatible with latest release
10099
rules_latest_release:
101-
# e.g. v4
102-
if: startsWith(github.base_ref, 'v')
103100
runs-on: ubuntu-20.04
104101
steps:
105102
- name: Get latest release executable name and version
106103
run: |
107104
v=$(curl -s https://api.github.com/repos/mandiant/capa/releases/latest | jq .name | tr -d '"')
108105
echo "zip_name=capa-$v-linux.zip" >> $GITHUB_ENV
109-
echo "major_version=$(echo $v | cut -d. -f1)" >> $GITHUB_ENV
110106
- name: Checkout capa-rules
111107
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
112108
with:
113-
ref: ${{ env.major_version }}
114109
path: rules
115110
- name: Checkout capa-testfiles
116111
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
117112
with:
118113
repository: mandiant/capa-testfiles
119114
path: tests/data
120115
- name: Fetch latest capa release executable
121-
uses: robinraju/release-downloader@v1
116+
uses: robinraju/release-downloader@a96f54c1b5f5e09e47d9504526e96febd949d4c2 # v1.11
122117
with:
123118
repository: "mandiant/capa"
124119
latest: true

0 commit comments

Comments
 (0)