Skip to content

Commit

Permalink
Add config to push the image;
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjan-stha committed Nov 8, 2024
1 parent cde727f commit f9cf4c9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- develop
- feat/*
pull_request:

jobs:
test:
Expand All @@ -16,7 +17,7 @@ jobs:

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: ${{ inputs.push_docker_image }}
if: github.event_name == 'push'
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -69,6 +70,13 @@ jobs:
tags: ${{ steps.prep.outputs.tagged_image }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

- name: 🐳 Docker push
if: github.event_name == 'push'
uses: docker/build-push-action@v6
with:
tags: ${{ steps.prep.outputs.tagged_image }}
push: true

- name: 🐳 Move docker cache (🧙 Hack fix)
run: |
Expand Down

0 comments on commit f9cf4c9

Please sign in to comment.