-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.63 KB
/
Copy pathdocker-image.yml
File metadata and controls
58 lines (54 loc) · 1.63 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
name: Build and Upload Container Images
run-name: Build Container Image
on: [push]
jobs:
Publish-Container-Image:
runs-on: ubuntu-20.04
permissions:
contents: read
packages: write
steps:
- name: Install Docker
run: curl -fsSL https://get.docker.com | sh
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Check out the repo
uses: actions/checkout@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 Docker image for Java 8
uses: docker/build-push-action@v5
with:
context: .
file: ./Java8-Dockerfile
push: true
tags: "ghcr.io/timystream/mjrt:8"
- name: Build and push Docker image for Java 11
uses: docker/build-push-action@v5
with:
context: .
file: ./Java11-Dockerfile
push: true
tags: "ghcr.io/timystream/mjrt:11"
- name: Build and push Docker image for Java 17
uses: docker/build-push-action@v5
with:
context: .
file: ./Java17-Dockerfile
push: true
tags: "ghcr.io/timystream/mjrt:17"
- name: Build and push Docker image for Java 21
uses: docker/build-push-action@v5
with:
context: .
file: ./Java21-Dockerfile
push: true
tags: "ghcr.io/timystream/mjrt:21"