Copilot commented on code in PR #307: URL: https://github.com/apache/calcite-avatica/pull/307#discussion_r3225070357
########## .github/workflows/build-1.28.0-docker-images.yml: ########## @@ -0,0 +1,81 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name: Build Docker Hub Images + +on: [push, pull_request] + Review Comment: The workflow is triggered on `pull_request`, but it performs `docker/login-action` with Docker Hub secrets and sets `push: true`. On PRs (especially from forks) secrets are not available, so this will fail; also, even for same-repo PRs it would attempt to publish images from unmerged code. Consider removing `pull_request` from triggers and/or gating login+push steps with an `if: github.event_name == 'push'` (and using `push: ${{ github.event_name == 'push' }}`) so PRs only build without pushing. ########## .github/workflows/build-1.28.0-docker-images.yml: ########## @@ -0,0 +1,81 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name: Build Docker Hub Images + +on: [push, pull_request] + +jobs: + build-avatica-image: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Generate Docker image tags + id: meta + uses: docker/metadata-action@v6 + with: + images: ${{ github.repository }} + flavor: | + latest=false + tags: | + type=raw,enable=true,priority=200,prefix=,suffix=,value=1.28.0 + - name: Set up Docker Buildx Review Comment: `on: [push, pull_request]` will run (and publish) on every branch push, but the tag value is hard-coded to `1.28.0`. Once merged, any subsequent push to the repo could overwrite/re-push the `1.28.0` Docker tags unintentionally. Please restrict this workflow to a safer trigger (e.g., `workflow_dispatch`, or `push` on a dedicated branch/tag) to avoid accidental republishing. ########## .github/workflows/build-1.28.0-docker-images.yml: ########## @@ -0,0 +1,81 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name: Build Docker Hub Images + +on: [push, pull_request] + +jobs: + build-avatica-image: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Generate Docker image tags + id: meta + uses: docker/metadata-action@v6 + with: + images: ${{ github.repository }} + flavor: | + latest=false + tags: | + type=raw,enable=true,priority=200,prefix=,suffix=,value=1.28.0 + - name: Set up Docker Buildx Review Comment: This workflow largely duplicates `.github/workflows/build-docker-hub-images.yml` (same two jobs/steps) but hard-codes the version/tag to 1.28.0. To reduce long-term maintenance and avoid accumulating per-release workflow files, consider extending the existing workflow to support manual rebuilds (e.g., `workflow_dispatch` with an input version/tag override) instead of adding a new, near-identical workflow. -- 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]
