Skip to content

Commit

Permalink
feat: add checkout ref to support building from a specific ref manual…
Browse files Browse the repository at this point in the history
…ly (#112)
  • Loading branch information
MSevey authored Sep 24, 2024
1 parent b1ea695 commit 0dffae8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/reusable_dockerfile_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
type: string
description: "The docker context"
default: "."
checkout_ref:
required: false
type: string
description: "Specific checkout reference"

env:
GITHUB_REG: ghcr.io
Expand All @@ -36,6 +40,8 @@ jobs:
steps:
- name: Checkout
uses: "actions/checkout@v4"
with:
ref: ${{ inputs.checkout_ref }}

- name: Add vars to ENV
id: setting_env
Expand Down Expand Up @@ -148,6 +154,8 @@ jobs:
steps:
- name: Checkout
uses: "actions/checkout@v4"
with:
ref: ${{ inputs.checkout_ref }}

- name: Build
uses: docker/build-push-action@v5
Expand Down Expand Up @@ -227,6 +235,8 @@ jobs:
- name: Checkout
if: ${{ steps.run_check.outputs.run == 'true'}}
uses: "actions/checkout@v4"
with:
ref: ${{ inputs.checkout_ref }}

- name: Login to ${{ matrix.registry.name }}
if: ${{ steps.run_check.outputs.run == 'true'}}
Expand Down

0 comments on commit 0dffae8

Please sign in to comment.