Skip to content

Commit

Permalink
add options for no build
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkonush committed Nov 15, 2024
1 parent 535f654 commit 2481f43
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/docker-build-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ on:
new_tag:
required: true
type: string
push_image:
required: false
type: boolean
default: false
secrets:
REGISTRY_USERNAME:
required: false
REGISTRY_TOKEN:
required: false

jobs:
build:
Expand All @@ -30,6 +39,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to Docker Registry
if: inputs.push_image
uses: docker/login-action@v3
with:
registry: kalmyk.duckdns.org
Expand All @@ -41,8 +51,8 @@ jobs:
with:
context: ${{ inputs.context }}
file: ${{ inputs.dockerfile }}
push: true
push: ${{ inputs.push_image }}
load: true
tags: |
${{ inputs.image_name }}:${{ inputs.new_tag }}
${{ inputs.image_name }}:latest
kalmyk.duckdns.org/${{ inputs.image_name }}:${{ inputs.new_tag }}
kalmyk.duckdns.org/${{ inputs.image_name }}:latest
4 changes: 4 additions & 0 deletions .github/workflows/pull-request-docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ jobs:
dockerfile: ./services/ecran/Dockerfile
context: ./services/ecran
new_tag: ${{ github.sha }}
push_image: false
secrets:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}

0 comments on commit 2481f43

Please sign in to comment.