mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
fix(workflow): Use pull request head SHA for checkout
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
b67df0eadf
commit
5a904e6ce4
2 changed files with 7 additions and 3 deletions
2
.github/workflows/deploy-pr.yml
vendored
2
.github/workflows/deploy-pr.yml
vendored
|
@ -40,6 +40,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Get yarn cache directory path
|
- name: Get yarn cache directory path
|
||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
|
|
8
.github/workflows/e2e.yml
vendored
8
.github/workflows/e2e.yml
vendored
|
@ -17,7 +17,7 @@ permissions:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_VERSION: 18
|
NODE_VERSION: 18
|
||||||
BUILD_CACHE_KEY: "${{ !!github.event.pull_request && github.event.pull_request.head.sha || github.sha }}"
|
HEAD_COMMIT_HASH: "${{ !!github.event.pull_request && github.event.pull_request.head.sha || github.sha }}"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-frontend:
|
build-frontend:
|
||||||
|
@ -27,13 +27,15 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ env.HEAD_COMMIT_HASH }}
|
||||||
|
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
uses: actions/cache@v3.0.11
|
uses: actions/cache@v3.0.11
|
||||||
id: build-cache
|
id: build-cache
|
||||||
with:
|
with:
|
||||||
path: .next
|
path: .next
|
||||||
key: ${{ env.BUILD_CACHE_KEY }}
|
key: ${{ env.HEAD_COMMIT_HASH }}
|
||||||
|
|
||||||
- name: Get yarn cache directory path
|
- name: Get yarn cache directory path
|
||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
|
@ -93,7 +95,7 @@ jobs:
|
||||||
id: build-cache
|
id: build-cache
|
||||||
with:
|
with:
|
||||||
path: .next
|
path: .next
|
||||||
key: ${{ env.BUILD_CACHE_KEY }}
|
key: ${{ env.HEAD_COMMIT_HASH }}
|
||||||
|
|
||||||
- name: Get yarn cache directory path
|
- name: Get yarn cache directory path
|
||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
|
|
Loading…
Reference in a new issue