adoroszlai commented on code in PR #3:
URL: https://github.com/apache/ranger-tools/pull/3#discussion_r2202382675
##########
.github/workflows/build.yaml:
##########
@@ -82,13 +82,23 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Optionally Update Java Version
+ run: |
+ if [ "${RANGER_BASE_JAVA_VERSION}" = "8" ]; then
+ echo "RANGER_BASE_JAVA_VERSION=1.8.0" >> $GITHUB_ENV
+ else
+ echo "RANGER_BASE_JAVA_VERSION=${RANGER_BASE_JAVA_VERSION}" >>
$GITHUB_ENV
+ fi
+ env:
+ RANGER_BASE_JAVA_VERSION: ${{ env.RANGER_BASE_JAVA_VERSION }}
Review Comment:
Variable from workflow `env` is available for the step.
```suggestion
```
##########
.github/workflows/build.yaml:
##########
@@ -82,13 +82,23 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Optionally Update Java Version
+ run: |
+ if [ "${RANGER_BASE_JAVA_VERSION}" = "8" ]; then
+ echo "RANGER_BASE_JAVA_VERSION=1.8.0" >> $GITHUB_ENV
+ else
+ echo "RANGER_BASE_JAVA_VERSION=${RANGER_BASE_JAVA_VERSION}" >>
$GITHUB_ENV
Review Comment:
This is already set in env.
```suggestion
```
##########
.github/workflows/build.yaml:
##########
@@ -82,13 +82,23 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Optionally Update Java Version
+ run: |
+ if [ "${RANGER_BASE_JAVA_VERSION}" = "8" ]; then
+ echo "RANGER_BASE_JAVA_VERSION=1.8.0" >> $GITHUB_ENV
+ else
+ echo "RANGER_BASE_JAVA_VERSION=${RANGER_BASE_JAVA_VERSION}" >>
$GITHUB_ENV
+ fi
+ env:
+ RANGER_BASE_JAVA_VERSION: ${{ env.RANGER_BASE_JAVA_VERSION }}
+
- name: Build and push image to GitHub Container Registry
id: build
if: ${{ steps.pull.outputs.success == 'false' }}
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
- file: docker/Dockerfile
- build-args: RANGER_BASE_JAVA_VERSION
+ context: "{{defaultContext}}:docker"
+ build-args: RANGER_BASE_JAVA_VERSION=${{
env.RANGER_BASE_JAVA_VERSION }}
Review Comment:
`build-args: RANGER_BASE_JAVA_VERSION` (without value) means it picks up the
value from the environment, which would be `${{ env.RANGER_BASE_JAVA_VERSION
}}`. So I don't think `=${{ env.RANGER_BASE_JAVA_VERSION }}` is necessary.
```suggestion
build-args: RANGER_BASE_JAVA_VERSION
```
--
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]