Skip to content

Commit

Permalink
enable repository cache for test
Browse files Browse the repository at this point in the history
  • Loading branch information
umegaya committed Feb 8, 2024
1 parent 218f5f5 commit 01871f4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1,467 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/deplo-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,25 @@ jobs:
run: |
curl -L https://github.com/suntomi/deplo/releases/download/nightly/deplo-Linux-$(uname -m) -o /usr/local/bin/deplo
chmod +x /usr/local/bin/deplo
- name: Fetch repository cache
id: fetch-repository-cache
uses: actions/cache@v2
with:
path: .git
key: deplo-git-v1-40BFB0C55D506BC4-${{ github.sha }}
restore-keys:
deplo-git-v1-40BFB0C55D506BC4-
- name: Checkout
if: steps.fetch-repository-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
fetch-depth: 2
fetch-depth: 0
ref: ${{ github.event.client_payload.exec.revision }}
submodules: true
token: ${{ secrets.SUNTOMI_VCS_ACCOUNT_KEY }}
- name: Restore repository from cache
if: steps.fetch-repository-cache.outputs.cache-hit == 'true'
run: git reset --hard HEAD && git submodule update --init --recursive

- name: dispatched
id: deplo-job-dispatched
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/deplo-manual-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,25 @@ jobs:
run: |
curl -L https://github.com/suntomi/deplo/releases/download/nightly/deplo-Linux-$(uname -m) -o /usr/local/bin/deplo
chmod +x /usr/local/bin/deplo
- name: Fetch repository cache
id: fetch-repository-cache
uses: actions/cache@v2
with:
path: .git
key: deplo-git-v1-40BFB0C55D506BC4-${{ github.sha }}
restore-keys:
deplo-git-v1-40BFB0C55D506BC4-
- name: Checkout
if: steps.fetch-repository-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
fetch-depth: 2
fetch-depth: 0
ref: ${{ github.event.client_payload.exec.revision }}
submodules: true
token: ${{ secrets.SUNTOMI_VCS_ACCOUNT_KEY }}
- name: Restore repository from cache
if: steps.fetch-repository-cache.outputs.cache-hit == 'true'
run: git reset --hard HEAD && git submodule update --init --recursive

- name: dispatched
id: deplo-job-dispatched
Expand Down
3 changes: 3 additions & 0 deletions Deplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,11 @@ caches = {
[jobs.dispatched]
on = { workflows = ["manual_dispatch", "webapi_dispatch"] }
runner = { os = "linux", local_fallback = { image = "ghcr.io/suntomi/images:aws", shell = "sh" } }
checkout = { fetch_depth = 0 }
command = """
set -e
git branch -a
git log --no-pager
echo "======================="
echo "dispatch context = ${DEPLO_CI_WORKFLOW_CONTEXT}"
echo "======================="
Expand Down
Loading

0 comments on commit 01871f4

Please sign in to comment.