Skip to content

Commit

Permalink
updated github workflows
Browse files Browse the repository at this point in the history
added github action to build a docker image when publishing a new release
  • Loading branch information
exelban committed Sep 26, 2024
1 parent 76a4ba6 commit 4a4a582
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and publish new docker image

on:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Login to docker hub
if: success()
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_REGISTRY_URL: ghcr.io

- name: Build image
if: success()
run: docker build -t ghcr.io/${GITHUB_REPOSITORY}/cli:${IMAGE_TAG} .

- name: Push to docker registry
if: success()
uses: actions-hub/docker/cli@master
with:
args: push ghcr.io/${GITHUB_REPOSITORY}/cli:${IMAGE_TAG}
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
kustomize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
echo 'configMapGenerator:
- name: example
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ jobs:
tag_name: ${{ steps.modify.outputs.tag }}
release_name: ${{ steps.modify.outputs.tag }}
draft: false
prerelease: false
prerelease: false

0 comments on commit 4a4a582

Please sign in to comment.