Skip to content

Commit

Permalink
Merge pull request #808 from bcgov/feat/workflow
Browse files Browse the repository at this point in the history
Enable manual workflow trigger with input to build pre-existing releases
  • Loading branch information
i5okie authored Jan 24, 2025
2 parents 4df3ef8 + 3b416d3 commit c5ca612
Showing 1 changed file with 29 additions and 12 deletions.
41 changes: 29 additions & 12 deletions .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Tag to build (leave empty for latest)'
required: false
default: ''

permissions:
packages: write
Expand All @@ -15,7 +20,10 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -33,10 +41,10 @@ jobs:
with:
images: ghcr.io/${{ github.repository }}/aries-vcr-agent
tags: |
type=raw,value=${{ github.event.inputs.tag }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref
type=sha
type=ref,event=tag
- name: Build and push image
id: builder
Expand All @@ -53,7 +61,10 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -68,10 +79,10 @@ jobs:
with:
images: ghcr.io/${{ github.repository }}/aries-vcr-api
tags: |
type=raw,value=${{ github.event.inputs.tag }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref
type=sha
type=ref,event=tag
- name: Setup and build
id: build_image
Expand All @@ -96,7 +107,10 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -111,10 +125,10 @@ jobs:
with:
images: ghcr.io/${{ github.repository }}/aries-vcr-db
tags: |
type=raw,value=${{ github.event.inputs.tag }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref
type=sha
type=ref,event=tag
- name: Setup and build
id: build_image
Expand All @@ -139,7 +153,10 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -154,10 +171,10 @@ jobs:
with:
images: ghcr.io/${{ github.repository }}/aries-vcr-solr
tags: |
type=raw,value=${{ github.event.inputs.tag }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref
type=sha
type=ref,event=tag
- name: Setup and build
id: build_image
Expand Down

0 comments on commit c5ca612

Please sign in to comment.