Skip to content

Commit 2e71de8

Browse files
authored
Cache per branch (#34)
1 parent bf380bc commit 2e71de8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

action.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ runs:
4141
uses: actions/cache@v3
4242
with:
4343
path: gitstream
44-
key: ${{ fromJSON(fromJSON(github.event.inputs.client_payload)).headSha }}-${{ fromJSON(fromJSON(github.event.inputs.client_payload)).repo }}-gitsream-cache
44+
key: ${{ fromJSON(fromJSON(github.event.inputs.client_payload)).repo }}-gitsream-cache
4545

4646
- name: Create GitStream folder
4747
## this step will be skipped if cache exists
@@ -75,6 +75,17 @@ runs:
7575
shell: bash
7676
if: ${{ steps.cache-gitstream.outputs.cache-hit != 'true' }}
7777
78+
- name: Configure Git
79+
shell: bash
80+
env:
81+
GITHUB_TOKEN: ${{ fromJSON(fromJSON(github.event.inputs.client_payload)).githubToken || github.token }}
82+
run: |
83+
cd gitstream
84+
cd repo
85+
git stash
86+
gh pr checkout ${{ fromJSON(fromJSON(github.event.inputs.client_payload)).pullRequestNumber }}
87+
if: ${{ steps.cache-gitstream.outputs.cache-hit == 'true' }}
88+
7889
- name: Create cm folder
7990
## this step will be skipped if cache exists
8091
if: ${{ steps.cache-gitstream.outputs.cache-hit != 'true' }}

0 commit comments

Comments
 (0)