-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (96 loc) · 3.04 KB
/
docker-ranger-base.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# 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: Docker-Build-Ranger-Base
on:
workflow_dispatch:
inputs:
rangerBranch:
description: 'ranger branch'
required: true
default: 'master'
type: choice
options:
- master
- ranger-2.3
rangerVersion:
description: 'latest'
required: true
default: 'latest'
type: choice
options:
- latest
- 2.3.0
env:
HUB: ghcr.io/flowerfine/ranger-base
RANGER_BRANCH: ${{ inputs.rangerBranch }}
RANGER_VERSION: ${{ inputs.rangerVersion }}
DOCKER_BUILDKIT: 1
MAVEN_OPTS: "-Xms2g -Xmx2g"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 30
steps:
- name: Checkout ranger-kubernetes
uses: actions/checkout@v3
with:
path: ranger-kubernetes
- name: Checkout ranger
uses: actions/checkout@v3
with:
repository: apache/ranger
ref: ${{ env.RANGER_BRANCH }}
path: ranger
- name: Setup JDK 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: temurin
cache: maven
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set Working Directory
run: cd ranger/dev-support/ranger-docker
- name: Build docker images
run: |
cd ranger/dev-support/ranger-docker; \
docker build \
--no-cache \
-f Dockerfile.ranger-base \
--build-arg RANGER_VERSION=${{ env.RANGER_VERSION }} \
-t ${{ env.HUB }}:${{ env.RANGER_VERSION }} \
.
- name: Push docker images
run: |
cd ranger/dev-support/ranger-docker; \
docker buildx build \
--no-cache \
--push \
-f Dockerfile.ranger-base \
--build-arg RANGER_VERSION=${{ env.RANGER_VERSION }} \
-t ${{ env.HUB }}:${{ env.RANGER_VERSION }} \
.