forked from ExocoreNetwork/exocore-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dddebd7
commit 5f7363a
Showing
8 changed files
with
150 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Cache the PR number | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
commit-hash: | ||
required: true | ||
type: string | ||
pr-number: | ||
required: true | ||
type: number | ||
|
||
jobs: | ||
cache: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print the inputs | ||
run: | | ||
echo "Commit hash: ${{ inputs.commit-hash }}" | ||
echo "PR number: ${{ inputs.pr-number }}" | ||
- name: Echo the PR number to a file | ||
run: echo "${{ inputs.pr-number }}" > res.txt | ||
- name: Cache the PR number | ||
uses: actions/cache/save@v3 | ||
with: | ||
key: pr-number-cache-${{ inputs.commit-hash }} | ||
path: res.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Restore the cached PR number | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
pr-number: | ||
description: The restored PR number from the cache | ||
value: ${{ jobs.uncache.outputs.pr-number }} | ||
inputs: | ||
commit-hash: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
uncache: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pr-number: ${{ steps.restore.outputs.pr-number }} | ||
steps: | ||
- name: Restore the PR number cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: pr-number-cache-${{ inputs.commit-hash }} | ||
path: res.txt | ||
- name: Save the PR number to the outputs | ||
id: restore | ||
run: echo "pr-number=$(cat res.txt)" >> "$GITHUB_OUTPUT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters