Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add checkout ref to support building from a specific ref manually #112

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading