Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable manual workflow trigger with input to build pre-existing releases #808

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading