-
Notifications
You must be signed in to change notification settings - Fork 9
46 lines (39 loc) · 1.43 KB
/
instaclustr-icarus.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
name: Icarus image
on:
workflow_dispatch:
inputs:
version:
description: Icarus version
required: true
jobs:
build-publish-icarus-image:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Clone instaclustr/cassandra-operator
uses: actions/checkout@v3
with:
repository: instaclustr/cassandra-operator
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Icarus Docker image using Makefile
id: build-and-get-tag
run: |
ICARUS_VERSION=${{ github.event.inputs.version }}
sed -i -e "1s/[0-9]\+\.[0-9]\+\.[0-9]/${ICARUS_VERSION}/" docker/cassandra-sidecar/Makefile
make -C docker cassandra-sidecar
echo base_openjre_tag_state=$(docker images base-openjre|awk '!/latest/ && NR>1 {print $2}') >> $GITHUB_ENV
- name: Push Icarus Docker image
uses: docker/build-push-action@v4
with:
context: docker/cassandra-sidecar
tags: ghcr.io/cscetbon/instaclustr-icarus:${{ github.event.inputs.version }}
build-args: |
openjre_image=base-openjre:${{ env.base_openjre_tag_state }}
instaclustr_icarus_jar=icarus-${{ github.event.inputs.version }}.jar
push: true