-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(github): revise github actions ci workflows
- [x] clean up workflows, add comments to justify suggestions; - [x] implement a reusable workflow that might be used later, add explanatory comments;
- Loading branch information
Showing
5 changed files
with
314 additions
and
162 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
# For more information see: | ||
# - https://docs.github.com/en/actions/using-workflows/reusing-workflows | ||
# - https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations | ||
|
||
# Note: | ||
# This workflow might be used after code is merged into the master branch. | ||
# The workflow is references in other workflows like: ngxs/store/.github/workflows/get-variables.yml@master | ||
|
||
name: get-variables | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
shortref: | ||
description: "Branch name" | ||
value: ${{ jobs.get-variables.outputs.shortref }} | ||
commitsha: | ||
description: "GitHub commit SHA" | ||
value: ${{ jobs.get-variables.outputs.commitsha }} | ||
yarncachedir: | ||
description: "Yarn cache directory" | ||
value: ${{ jobs.get-variables.outputs.yarncachedir }} | ||
|
||
jobs: | ||
get-variables: | ||
name: Get variables (branch name, commit hash, yarn cache directory) | ||
runs-on: ubuntu-latest | ||
outputs: | ||
shortref: ${{ steps.get-variables.outputs.firstword }} | ||
commitsha: ${{ steps.get-variables.outputs.secondword }} | ||
yarncachedir: ${{ steps.get-variables.outputs.secondword }} | ||
steps: | ||
- id: get-variables | ||
run: | | ||
echo "::set-output name=shortref::${GITHUB_REF#refs/*/}"; | ||
echo "::set-output name=commitsha::$(echo ${GITHUB_SHA})"; | ||
echo "::set-output name=yarncachedir::$(yarn cache dir)"; |
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
Oops, something went wrong.