Skip to content

Commit

Permalink
TECH-13067: skaffold cache fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexb-y42 committed Dec 1, 2022
1 parent dd2d22e commit 53f7acf
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 19 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy-git-flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.skaffold/cache
key: ${{ runner.os }}-skaffold
key: ${{ runner.os }}-skaffold-${{ github.sha }}
restore-keys: |-
${{ runner.os }}-skaffold-${{ github.sha }}
${{ runner.os }}-skaffold
- uses: actions/download-artifact@v3
if: inputs.dist-artifact
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,10 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.skaffold/cache
key: ${{ runner.os }}-skaffold
key: ${{ runner.os }}-skaffold-${{ github.sha }}
restore-keys: |-
${{ runner.os }}-skaffold-${{ github.sha }}
${{ runner.os }}-skaffold
- name: Download artifact
uses: actions/download-artifact@v3
if: inputs.dist-artifact
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.skaffold/cache
key: ${{ runner.os }}-skaffold
key: ${{ runner.os }}-skaffold-${{ github.sha }}
restore-keys: |-
${{ runner.os }}-skaffold-${{ github.sha }}
${{ runner.os }}-skaffold
- uses: actions/download-artifact@v3
if: inputs.dist-artifact
with:
Expand Down
9 changes: 1 addition & 8 deletions pkg/common/deploy-integration.cue
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,7 @@ import "list"
path: "./code"
}
},
{
name: "Setup skaffold cache"
uses: "actions/cache@v3"
with: {
path: "~/.skaffold/cache"
key: "${{ runner.os }}-skaffold"
}
},
#with.skaffold_cache.step,
{
name: "Download artifact"
uses: "actions/download-artifact@v3"
Expand Down
9 changes: 1 addition & 8 deletions pkg/common/deploy.cue
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,7 @@ import "list"
path: "./code"
}
},
{
name: "Setup skaffold cache"
uses: "actions/cache@v3"
with: {
path: "~/.skaffold/cache"
key: "${{ runner.os }}-skaffold"
}
},
#with.skaffold_cache.step,
{
uses: "actions/download-artifact@v3"
if: "inputs.dist-artifact"
Expand Down
14 changes: 14 additions & 0 deletions pkg/common/steps.cue
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,18 @@ package common
}
}
}
skaffold_cache: {
step: #step & {
name: "Setup skaffold cache"
uses: "actions/cache@v3"
with: {
path: "~/.skaffold/cache"
key: "${{ runner.os }}-skaffold-${{ github.sha }}"
"restore-keys": """
${{ runner.os }}-skaffold-${{ github.sha }}
${{ runner.os }}-skaffold
"""
}
}
}
}

0 comments on commit 53f7acf

Please sign in to comment.