Skip to content

Commit

Permalink
chore: fix docker-publish attempt 1 (#851)
Browse files Browse the repository at this point in the history
* fix docker-publish

* add java distribution
  • Loading branch information
andygrove authored Aug 20, 2024
1 parent 9d2c87f commit 9d8730d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 34 deletions.
68 changes: 35 additions & 33 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,38 @@ on:
- '*.*.*-rc*'
- 'test-docker-publish-*'

docker:
name: Docker
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
- name: Extract Comet version
id: extract_version
run: |
COMET_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "COMET_VERSION=$COMET_VERSION" >> $GITHUB_ENV
- name: Echo Comet version
run: echo "The current Comet version is ${{ env.COMET_VERSION }}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: apache/datafusion-comet:spark-3.4-scala-2.12-${{ env.COMET_VERSION }}
file: kube/Dockerfile
jobs:
docker:
name: Docker
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Extract Comet version
id: extract_version
run: |
COMET_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "COMET_VERSION=$COMET_VERSION" >> $GITHUB_ENV
- name: Echo Comet version
run: echo "The current Comet version is ${{ env.COMET_VERSION }}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: apache/datafusion-comet:spark-3.4-scala-2.12-${{ env.COMET_VERSION }}
file: kube/Dockerfile
2 changes: 1 addition & 1 deletion kube/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ ENV SCALA_VERSION=2.12
USER root

# ntoe the use of a wildcard in the file name so that this works with both snapshot and final release versions
COPY --from=builder /comet/spark/target/comet-spark-spark${SPARK_VERSION}_$SCALA_VERSION-0.2.0*.jar $SPARK_HOME/jars
COPY --from=builder /comet/spark/target/comet-spark-spark${SPARK_VERSION}_$SCALA_VERSION-0.2.0*.jar $SPARK_HOME/jars

0 comments on commit 9d8730d

Please sign in to comment.