File tree Expand file tree Collapse file tree 2 files changed +23
-16
lines changed Expand file tree Collapse file tree 2 files changed +23
-16
lines changed Original file line number Diff line number Diff line change @@ -23,20 +23,23 @@ jobs:
23
23
artifact-id : ${{ steps.upload-artifact.outputs.artifact-id }}
24
24
25
25
steps :
26
- - name : Download cached SETools
27
- uses : actions/cache@v4
28
- id : cache-setools
29
- with :
30
- path : " setools-*.whl"
31
- key : setools-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}-Python${{ inputs.python-version }}
32
-
33
26
- name : Checkout setools
34
27
uses : actions/checkout@v4
35
- if : ${{ steps.cache-setools.outputs.cache-hit != 'true' }}
36
28
with :
37
29
repository : SELinuxProject/setools
38
30
ref : " ${{ inputs.version }}"
39
31
32
+ - name : Get the latest commit hash
33
+ shell : bash
34
+ run : echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
35
+
36
+ - name : Download cached SETools
37
+ uses : actions/cache@v4
38
+ id : cache-setools
39
+ with :
40
+ path : " setools-*.whl"
41
+ key : setools-${{ inputs.version }}-${{ env.COMMIT_HASH }}-${{ runner.os }}-${{ runner.arch }}-Python${{ inputs.python-version }}
42
+
40
43
- name : Download userspace artifact
41
44
uses : actions/download-artifact@v4
42
45
if : ${{ steps.cache-setools.outputs.cache-hit != 'true' }}
Original file line number Diff line number Diff line change @@ -27,21 +27,25 @@ jobs:
27
27
binary-id : ${{ steps.upload-artifact.outputs.artifact-id }}
28
28
29
29
steps :
30
- - name : Download cached SELinux userspace
31
- uses : actions/cache@v4
32
- id : cache-userspace
33
- with :
34
- path : ${{ github.workspace }}/selinux.tar.gz
35
- key : selinux-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}-Python${{ inputs.python-version }}
36
-
37
30
- name : Checkout SELinux userspace tools and libs
38
31
uses : actions/checkout@v4
39
- if : ${{ steps.cache-userspace.outputs.cache-hit != 'true' }}
40
32
with :
41
33
repository : SELinuxProject/selinux
42
34
ref : " ${{ inputs.version }}"
43
35
path : " ${{ env.SELINUX_SRC }}"
44
36
37
+ - name : Get the latest commit hash
38
+ shell : bash
39
+ run : echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
40
+ working-directory : " ${{ env.SELINUX_SRC }}"
41
+
42
+ - name : Download cached SELinux userspace
43
+ uses : actions/cache@v4
44
+ id : cache-userspace
45
+ with :
46
+ path : ${{ github.workspace }}/selinux.tar.gz
47
+ key : selinux-${{ inputs.version }}-${{ env.COMMIT_HASH }}-${{ runner.os }}-${{ runner.arch }}-Python${{ inputs.python-version }}
48
+
45
49
- name : Set up Python
46
50
uses : actions/setup-python@v5
47
51
if : ${{ steps.cache-userspace.outputs.cache-hit != 'true' }}
You can’t perform that action at this time.
0 commit comments