adnanhemani commented on code in PR #1377: URL: https://github.com/apache/polaris/pull/1377#discussion_r2048030302
########## .github/workflows/publish-docker.yml: ########## @@ -0,0 +1,71 @@ +# +# 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. +# + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Publish Docker image + +on: + release: + types: [published] + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + attestations: write + id-token: write + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Log in to Docker Hub + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a #v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Docker Image build + run: | + ./gradlew \ + :polaris-quarkus-server:assemble \ + :polaris-quarkus-server:quarkusAppPartsBuild --rerun \ + :polaris-quarkus-admin:assemble \ + :polaris-quarkus-admin:quarkusAppPartsBuild --rerun \ + -Dquarkus.container-image.build=true \ + -PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 + + - name: List all Docker images + run: docker images + + - name: Push Docker image to Docker Hub + run: | + docker push apache/polaris Review Comment: The GitHub metadata that generates the version is a bit wonky and requires some parsing. But I know that when we build the Docker images using `./gradlew`, it creates tags for both the version and `latest`. Do you think it is okay to push them all using the `docker push apache/polaris --all-tags`? ref: https://github.com/adnanhemani/polaris/actions/runs/14486887998/job/40634198664#step:7:20 -- 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]
