Skip to content

Commit

Permalink
Merge pull request #555 from ministryofjustice/add-additional-build-o…
Browse files Browse the repository at this point in the history
…ption

Fix input syntax, re-add tags step and change to branch
  • Loading branch information
mikebell authored Mar 14, 2024
2 parents 61fcd0e + 393c706 commit 4a78f94
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/build-adhoc-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Build and push a new adhoc release

on:
workflow_dispatch:
inputs:
build_branch:
description: "Branch to build from"
required: true
default: "main"

permissions:
contents: write
Expand All @@ -18,8 +13,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.events.inputs.build_branch }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -33,17 +26,18 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# - name: Get Tags for Image
# id: metadata
# uses: docker/metadata-action@v5
# with:
# images: ministryofjustice/cloud-platform-cli
# tags: |
# type=ref,event=tag
- name: Get Tags for Image
id: metadata
uses: docker/metadata-action@v5
with:
images: ministryofjustice/cloud-platform-cli
tags: |
type=ref,event=branch
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ github.events.inputs.build_branch }}
build-args: CLOUD_PLATFORM_CLI_VERSION=${{ github.events.inputs.build_branch }}
tags: ${{ steps.metadata.outputs.tags }}
build-args: CLOUD_PLATFORM_CLI_VERSION=${{ steps.metadata.outputs.tags }}

0 comments on commit 4a78f94

Please sign in to comment.