imbajin commented on code in PR #2076:
URL:
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1067109524
##########
.github/workflows/validate-release.yml:
##########
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+ workflow_dispatch:
+ inputs:
+ current_version:
+ required: true
+ default: '1.0.0'
+ deploy_maven:
+ required: true
+ default: 'false'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ env:
+ SCRIPT_PATH: hugegraph-dist/scripts/
+ steps:
+ - name: Checkout source
+ uses: actions/checkout@v3
+ - name: Install JDK ${{ matrix.JAVA_VERSION }}
+ uses: actions/setup-java@v3
+ with:
+ java-version: ${{ matrix.JAVA_VERSION }}
+ distribution: 'adopt'
+ - name: Cache Maven packages
+ uses: actions/cache@v3
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Get Yarn path
+ id: yarn-cache-dir-path
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+ - name: Cache Yarn packages
+ uses: actions/cache@v3
+ # use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit !=
'true'`)
+ id: yarn-cache
+ with:
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
+
+ # TODO: do we need svn & gpg environment?
+ - name: Test Building Source & Running
+ run: |
+ bash $SCRIPT_PATH/validate-release.sh ${{
github.event.inputs.current_version }} \
Review Comment:
> like env SCRIPT_PATH at line 17. for more details
[docs.github.com/en/actions/learn-github-actions/variables#using-the-vars-context-to-access-configuration-variable-values](https://docs.github.com/en/actions/learn-github-actions/variables#using-the-vars-context-to-access-configuration-variable-values)
The env params is **fixed**, and we need a flexible params like the
pic(modify the value when we want to run the action), how could we define a
flexible using `env`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]