Skip to content

Commit 2e5e41f

Browse files
committed
validated jar and added docker publish back
1 parent 6bf4ce5 commit 2e5e41f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/docker-publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and publish to docker repo
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build_and_publish:
8+
name: Build and publish docker image
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out source code
12+
uses: actions/checkout@v3
13+
# Setup metadata based on the commit/tag that will be used for tagging the image
14+
- name: Setup Docker meta
15+
id: meta
16+
uses: docker/metadata-action@v3
17+
with:
18+
images: |
19+
datastax/cassandra-data-migrator
20+
flavor: |
21+
latest=auto
22+
tags: |
23+
type=ref,event=branch
24+
type=semver,pattern={{version}}
25+
type=semver,pattern={{major}}.{{minor}}.x
26+
type=semver,pattern={{major}}.x
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v2
29+
- name: Login to DockerHub
30+
uses: docker/login-action@v2
31+
with:
32+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
33+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
34+
- name: Build and push
35+
id: docker_build
36+
uses: docker/build-push-action@v3
37+
with:
38+
file: Dockerfile
39+
context: .
40+
push: true
41+
tags: ${{ steps.meta.outputs.tags }}
42+
platforms: linux/amd64

0 commit comments

Comments
 (0)