-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (36 loc) · 1.21 KB
/
ci-build-images.yaml
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
name: Infra CI - publish docker images
on:
workflow_dispatch:
inputs:
version:
type: string
description: "Custom tag to publish container image version"
required: true
jobs:
publish-images:
runs-on: ubuntu-22.04
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Login to container image repository
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build all images
run: scripts/build-all.sh ${{ inputs.version }}
- name: Push images to image registry
run: scripts/publish-all.sh ${{ inputs.version }}
- name: Login to container image repository
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Publish to ghcr.io
run: |
for javaVersion in 8 11 17 21 ; do
imageName=virtuslab/scala-community-build-project-builder:jdk${javaVersion}-latest
docker tag $imageName ghcr.io/$imageName
docker push ghcr.io/$imageName
done