Skip to content

Commit 4a4a582

Browse files
committed
updated github workflows
added github action to build a docker image when publishing a new release
1 parent 76a4ba6 commit 4a4a582

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

.github/workflows/docker-image.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and publish new docker image
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Login to docker hub
16+
if: success()
17+
uses: actions-hub/docker/login@master
18+
env:
19+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
20+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
21+
DOCKER_REGISTRY_URL: ghcr.io
22+
23+
- name: Build image
24+
if: success()
25+
run: docker build -t ghcr.io/${GITHUB_REPOSITORY}/cli:${IMAGE_TAG} .
26+
27+
- name: Push to docker registry
28+
if: success()
29+
uses: actions-hub/docker/cli@master
30+
with:
31+
args: push ghcr.io/${GITHUB_REPOSITORY}/cli:${IMAGE_TAG}

.github/workflows/tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
kustomize:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
1010
- run: |
1111
echo 'configMapGenerator:
1212
- name: example

.github/workflows/upgrader.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ jobs:
8888
tag_name: ${{ steps.modify.outputs.tag }}
8989
release_name: ${{ steps.modify.outputs.tag }}
9090
draft: false
91-
prerelease: false
91+
prerelease: false

0 commit comments

Comments
 (0)