kyuubi/.github/workflows/docker-image.yml
Kent Yao 5836db6004
[KYUUBI #1947] Revamp Github Action settings for CI
<!--
Thanks for sending a pull request!

Here are some tips for you:
  1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
  2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->

### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
  1. If you add a feature, you can talk about the use case of it.
  2. If you fix a bug, you can clarify why it is a bug.
-->

1. Add missing asf header
2. Disable fail-fast to let jobs run individually
3. Group defaults maven builds with java & spark version matrix
    - so this PR brings fully tests with JDK 11 back
4. Group others(now cross-version check only) in `include`
5. replace `actions/cachev2` with `actions/setup-javav2` - `cache: 'maven'`

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Need to pass all CI jobs

Closes #1947 from yaooqinn/ga.

Closes #1947

7d5d2472 [Kent Yao] address comment
d8d347b0 [Kent Yao] address comment
8c3cba99 [Kent Yao] address comment
7400cdc6 [Kent Yao] checkout
20eeb7bb [Kent Yao] test
b1c70e42 [Kent Yao] test
4ca4f233 [Kent Yao] test
b588cd32 [Kent Yao] test
da4f6aea [Kent Yao] test
057790d5 [Kent Yao] test
01b07b25 [Kent Yao] test
2906ec66 [Kent Yao] test
4d97bf19 [Kent Yao] test
cf16f169 [Kent Yao] test
8c12b8ef [Kent Yao] test
3b84e450 [Kent Yao] test
6e21d97a [Kent Yao] test
dc2d9004 [Kent Yao] test
1cff392d [Kent Yao] test
a4b47476 [Kent Yao] test
c4718022 [Kent Yao] test
d264d33d [Kent Yao] test
ee293c13 [Kent Yao] test
903cb0bb [Kent Yao] test
f74fa1a5 [Kent Yao] test

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2022-02-22 13:39:54 +08:00

48 lines
1.6 KiB
YAML

#
# 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: Publish Docker image
on:
push:
branches:
- master
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
if: ${{ startsWith(github.repository, 'apache/') }}
runs-on: ubuntu-20.04
concurrency:
# this group should be global unique
group: push-docker-image
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Kyuubi Docker Image
run: docker build --tag apache/kyuubi:master-snapshot --file build/Dockerfile .
- name: Docker image
run: docker images
- name: Push Docker image
run: docker push apache/kyuubi:master-snapshot