Skip to content

Commit 030daa4

Browse files
committed
ci(fix): Fix new workflows
1 parent 297757a commit 030daa4

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/workflows/hw.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ jobs:
5555
with:
5656
ref: ${{ github.event.pull_request.head.sha || github.sha }}
5757

58-
- uses: actions/setup-python@v5
59-
if: steps.check-tests.outputs.enabled == 'true'
60-
with:
61-
cache-dependency-path: tests/requirements.txt
62-
cache: 'pip'
63-
python-version: '3.10.1'
58+
# setup-python currently only works on ubuntu images
59+
# - uses: actions/setup-python@v5
60+
# if: steps.check-tests.outputs.enabled == 'true'
61+
# with:
62+
# cache-dependency-path: tests/requirements.txt
63+
# cache: 'pip'
64+
# python-version: '3.10.1'
6465

6566
- name: Install dependencies
6667
if: ${{ steps.check-tests.outputs.enabled == 'true' }}

.github/workflows/tests.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
clean:
168168
name: Clean objects
169169
needs: unit-test-results
170-
if: always() && ${{ github.event_name }} == 'pull_request_target' && ${{ github.event.action }} != 'closed'
170+
if: always()
171171
permissions:
172172
actions: write
173173
runs-on: ubuntu-latest
@@ -179,6 +179,11 @@ jobs:
179179
const ref = '${{ github.event.pull_request.number || github.ref }}';
180180
const key_prefix = 'tests-' + ref + '-';
181181
182+
if ('${{ github.event_name }}' == 'pull_request_target' && '${{ github.event.action }}' != 'closed') {
183+
console.log('Skipping cache cleanup for open PR');
184+
return;
185+
}
186+
182187
await github.paginate(github.rest.actions.getActionsCacheList, {
183188
owner: context.repo.owner,
184189
repo: context.repo.repo,

0 commit comments

Comments
 (0)