From 4e96ca83762b0c69a220ccb34f1d0a4331cde5dc Mon Sep 17 00:00:00 2001 From: Zach Gollwitzer Date: Mon, 3 Mar 2025 14:34:56 -0500 Subject: [PATCH] Add manual Docker publishing trigger in GH action workflow --- .github/workflows/publish.yml | 9 +++++++++ Dockerfile | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 86ba83cf..ef6dbe94 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,13 @@ name: Publish Docker image on: + workflow_dispatch: + inputs: + ref: + description: 'Git ref (tag or commit SHA) to build' + required: true + type: string + default: 'main' push: tags: - 'v*' @@ -33,6 +40,8 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref || github.ref }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/Dockerfile b/Dockerfile index aeb8aaa0..ff2d8d30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ ENV RAILS_ENV="production" \ FROM base AS build # Install packages needed to build gems -RUN apt-get install --no-install-recommends -y build-essential libpq-dev pkg-config +RUN apt-get install --no-install-recommends -y build-essential libpq-dev git pkg-config # Install application gems COPY .ruby-version Gemfile Gemfile.lock ./