Skip to content

Commit

Permalink
Merge pull request #5 from sredevopsdev/env-var-ghost-version
Browse files Browse the repository at this point in the history
Env var ghost version
  • Loading branch information
ngeorger authored Jun 23, 2023
2 parents 41f447a + 7ffe698 commit e2257dc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
38 changes: 26 additions & 12 deletions .github/workflows/build-custom-image.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
name: ci

on:
push:
branches:
- 'main'
paths:
- 'Dockerfile'
- 'docker-entrypoint.sh'
- '.github/workflows/build-custom-image.yaml'
tags:
- 'v*'
pull_request:
branches:
- 'main'
# push:
# branches:
# - 'main'
# paths:
# - 'Dockerfile'
# - 'docker-entrypoint.sh'
# - '.github/workflows/build-custom-image.yaml'
# tags:
# - 'v*'
# pull_request:
# branches:
# - 'main'
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
default: 'latest'
type: string
ghost_version:
description: 'Ghost version'
required: true
default: '5.0.0'
type: string


jobs:
docker:
Expand Down Expand Up @@ -91,3 +103,5 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GHOST_VERSION=${{ github.event.inputs.ghost_version }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ RUN set -eux; \
ENV GHOST_INSTALL /var/lib/ghost
ENV GHOST_CONTENT /var/lib/ghost/content

ARG GHOST_VERSION 5.52.0
ENV $GHOST_VERSION
ARG GHOST_VERSION
ENV GHOST_VERSION $GHOST_VERSION

RUN set -eux; \
mkdir -p "$GHOST_INSTALL"; \
Expand Down

0 comments on commit e2257dc

Please sign in to comment.