|
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches: [ master, 'v[0-9]+' ] |
| 5 | + branches: [ master ] |
6 | 6 | pull_request: |
7 | | - branches: [ master, 'v[0-9]+' ] |
| 7 | + branches: [ master ] |
8 | 8 | # trigger workflow on edited as well (opened and synchronize are default) |
9 | 9 | types: [opened, edited, synchronize] |
10 | 10 | workflow_dispatch: |
@@ -95,30 +95,25 @@ jobs: |
95 | 95 | done |
96 | 96 | continue-on-error: true |
97 | 97 |
|
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 |
100 | 99 | rules_latest_release: |
101 | | - # e.g. v4 |
102 | | - if: startsWith(github.base_ref, 'v') |
103 | 100 | runs-on: ubuntu-20.04 |
104 | 101 | steps: |
105 | 102 | - name: Get latest release executable name and version |
106 | 103 | run: | |
107 | 104 | v=$(curl -s https://api.github.com/repos/mandiant/capa/releases/latest | jq .name | tr -d '"') |
108 | 105 | echo "zip_name=capa-$v-linux.zip" >> $GITHUB_ENV |
109 | | - echo "major_version=$(echo $v | cut -d. -f1)" >> $GITHUB_ENV |
110 | 106 | - name: Checkout capa-rules |
111 | 107 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
112 | 108 | with: |
113 | | - ref: ${{ env.major_version }} |
114 | 109 | path: rules |
115 | 110 | - name: Checkout capa-testfiles |
116 | 111 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
117 | 112 | with: |
118 | 113 | repository: mandiant/capa-testfiles |
119 | 114 | path: tests/data |
120 | 115 | - name: Fetch latest capa release executable |
121 | | - uses: robinraju/release-downloader@v1 |
| 116 | + uses: robinraju/release-downloader@a96f54c1b5f5e09e47d9504526e96febd949d4c2 # v1.11 |
122 | 117 | with: |
123 | 118 | repository: "mandiant/capa" |
124 | 119 | latest: true |
|
0 commit comments