Skip to content

Commit 6a926d4

Browse files
committed
ci test
1 parent bcb76fe commit 6a926d4

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
with:
6969
context: .
7070
push: false
71+
cache-from: type=gha
72+
cache-to: type=gha,mode=max
7173
tags: |
7274
${{ env.CR_REPO }}:${{ github.ref_name }}-${{ steps.vars.outputs.sha_short }}
7375
-
@@ -79,6 +81,8 @@ jobs:
7981
with:
8082
context: .
8183
push: true
84+
cache-from: type=gha
85+
cache-to: type=gha,mode=max
8286
build-args: |
8387
kafka_version=${{ steps.vars.outputs.kafka_version }}
8488
tags: |
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Docker Publish Snapshot
2+
3+
on:
4+
workflow_dispatch: ## on button click
5+
schedule:
6+
- cron: '0 1 * * *'
7+
push:
8+
paths:
9+
- Dockerfile
10+
- entrypoint.sh
11+
- '.github/workflows/docker*'
12+
branches:
13+
- main
14+
tags:
15+
- v[0-9]*
16+
17+
env:
18+
CR_REPO: sir5kong/kafka
19+
KAFKA_VERSION: "3.5.0"
20+
21+
jobs:
22+
docker:
23+
runs-on: ubuntu-latest
24+
steps:
25+
-
26+
name: Checkout
27+
uses: actions/checkout@v3
28+
-
29+
name: Login to Docker Hub
30+
uses: docker/login-action@v2
31+
with:
32+
username: ${{ secrets.DOCKERHUB_USERNAME }}
33+
password: ${{ secrets.DOCKERHUB_TOKEN }}
34+
-
35+
name: Docker build testing
36+
uses: docker/build-push-action@v4
37+
if: github.ref_name == 'main'
38+
with:
39+
context: .
40+
push: true
41+
cache-from: type=gha
42+
cache-to: type=gha,mode=max
43+
tags: |
44+
${{ env.CR_REPO }}:snapshot

0 commit comments

Comments
 (0)