From ce949094a48ccc364448f238059e60f072a6f697 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Sun, 15 Sep 2024 21:53:51 +0100 Subject: [PATCH] make it possible to call publish --- .github/workflows/publish-docker.yml | 10 +++++++++- .github/workflows/publish-infra.yml | 8 ++++++++ .github/workflows/publish.yml | 10 ++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 7a6d946a2..6c0a4315d 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -2,6 +2,12 @@ name: "🐳 Publish Docker" on: workflow_call: + inputs: + image_tag: + description: The image tag to publish + type: string + required: false + default: "" jobs: publish: @@ -12,7 +18,7 @@ jobs: version: ${{ steps.get_tag.outputs.tag }} short_sha: ${{ steps.get_commit.outputs.sha_short }} steps: - - name: Setup Depot CLI + - name: 🏭 Setup Depot CLI uses: depot/setup-action@v1 - name: ⬇️ Checkout repo @@ -23,6 +29,8 @@ jobs: - name: "#️⃣ Get the image tag" id: get_tag uses: ./.github/actions/get-image-tag + with: + tag: ${{ github.event.inputs.image_tag }} - name: 🔢 Get the commit hash id: get_commit diff --git a/.github/workflows/publish-infra.yml b/.github/workflows/publish-infra.yml index 502d4347f..57ac4b857 100644 --- a/.github/workflows/publish-infra.yml +++ b/.github/workflows/publish-infra.yml @@ -2,6 +2,12 @@ name: "🚢 Publish Infra Images" on: workflow_call: + inputs: + image_tag: + description: The image tag to publish + type: string + required: false + default: "" push: tags: - "infra-dev-*" @@ -37,6 +43,8 @@ jobs: - id: get_tag uses: ./.github/actions/get-image-tag + with: + tag: ${{ github.event.inputs.image_tag }} - name: 🐋 Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 89a96e18f..a60a026a3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,12 @@ name: 🚀 Publish Trigger.dev Docker on: + workflow_call: + inputs: + image_tag: + description: The image tag to publish + required: true + type: string push: branches: - main @@ -55,8 +61,12 @@ jobs: needs: [typecheck, units] uses: ./.github/workflows/publish-docker.yml secrets: inherit + with: + image_tag: ${{ github.event.inputs.image_tag }} publish-infra: needs: [typecheck, units] uses: ./.github/workflows/publish-infra.yml secrets: inherit + with: + image_tag: ${{ github.event.inputs.image_tag }}