-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (64 loc) · 2.22 KB
/
docker-image.yml
File metadata and controls
73 lines (64 loc) · 2.22 KB
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
name: Docker Image CI
on:
push:
tags:
- "*"
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-24.04
env:
GRAALVM_VERSION: 25.0.2
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Extract version components
id: version
run: |
VERSION="${{ env.GRAALVM_VERSION }}"
MAJOR=$(echo $VERSION | cut -d. -f1)
MINOR=$(echo $VERSION | cut -d. -f1-2)
echo "major=$MAJOR" >> $GITHUB_OUTPUT
echo "minor=$MINOR" >> $GITHUB_OUTPUT
echo "full=$VERSION" >> $GITHUB_OUTPUT
- name: Build and push distroless image (default)
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile.distroless
platforms: linux/amd64,linux/arm64
push: true
pull: true
no-cache: false
build-args: |
GRAALVM_VERSION=${{ env.GRAALVM_VERSION }}
tags: |
softinstigate/graalvm:latest
softinstigate/graalvm:${{ github.ref_name }}
softinstigate/graalvm:${{ steps.version.outputs.major }}
softinstigate/graalvm:${{ steps.version.outputs.minor }}
softinstigate/graalvm:${{ steps.version.outputs.full }}
- name: Build and push shell variant
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
pull: true
no-cache: false
build-args: |
GRAALVM_VERSION=${{ env.GRAALVM_VERSION }}
tags: |
softinstigate/graalvm:${{ github.ref_name }}-shell
softinstigate/graalvm:${{ steps.version.outputs.major }}-shell
softinstigate/graalvm:${{ steps.version.outputs.minor }}-shell
softinstigate/graalvm:${{ steps.version.outputs.full }}-shell