Skip to content

Commit 990c717

Browse files
authored
Setup remote cache after auth success (#932)
It seems like there is some eagerness with GitHub actiosn starting to run steps after a previous step is not totally complete or some issue with ensuring those env variables are set correctlly across steps. This forces us to wait until after we've successfully assumed the credentials role to configure the cache.
1 parent 7e2b9e4 commit 990c717

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/actions/setup-sccache/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,21 @@ runs:
5252
}
5353
5454
- name: Authenticate to AWS
55+
id: aws-credentials
5556
uses: aws-actions/configure-aws-credentials@v3
5657
if: inputs.aws-arn != ''
5758
with:
5859
role-to-assume: ${{ inputs.aws-arn }}
5960
role-session-name: ToolchainCISccacheAccess
6061
aws-region: ${{ inputs.aws-region }}
6162

62-
- name: Setup sccache
63+
- name: Setup sccache (remote)
64+
if: inputs.aws-arn != '' && steps.aws-credentials.outcome == 'success'
65+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
66+
with:
67+
variant: sccache
68+
69+
- name: Setup sccache (local)
6370
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
6471
with:
6572
max-size: ${{ inputs.disk-max-size }}

0 commit comments

Comments
 (0)