Skip to content

Commit

Permalink
ci: Enable manual release of container images (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppawlowski committed Mar 7, 2024
2 parents 3726e30 + c283cac commit 3fb98dd
Showing 1 changed file with 13 additions and 48 deletions.
61 changes: 13 additions & 48 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
on:
push:
tags:
- "v*.*.*"
name: Release container images
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true

jobs:
build_application_container:
Expand All @@ -12,13 +15,13 @@ jobs:
repository: 'flowfuse/helm'
path: 'helm'
# sets options for Docker build
# will tag contianers with GH tag name
# will tag contianers with ${{ github.event.inputs.version }} and latest
- name: Docker Meta Data
id: meta
uses: docker/metadata-action@v4
with:
tags: |
type=semver,event=tag,pattern={{version}}
type=raw,enable=true,priority=200,prefix=,suffix=,value=${{ github.event.inputs.version }}
flavor: |
latest=true
images: |
Expand Down Expand Up @@ -72,7 +75,7 @@ jobs:
uses: docker/metadata-action@v4
with:
tags: |
type=semver,event=tag,pattern={{version}}
type=raw,enable=true,priority=200,prefix=,suffix=,value=${{ github.event.inputs.version }}
flavor: |
latest=true
images: |
Expand Down Expand Up @@ -122,7 +125,7 @@ jobs:
uses: docker/metadata-action@v4
with:
tags: |
type=semver,event=tag,pattern={{version}}-2.2.3
type=raw,enable=true,priority=200,prefix=,suffix=-2.2.3,value=${{ github.event.inputs.version }}
flavor: |
latest=false
images: |
Expand Down Expand Up @@ -158,7 +161,7 @@ jobs:
uses: docker/metadata-action@v4
with:
tags: |
type=semver,event=tag,pattern={{version}}-3.1.x
type=raw,enable=true,priority=200,prefix=,suffix=-3.1.x,value=${{ github.event.inputs.version }}
flavor: |
latest=false
images: |
Expand Down Expand Up @@ -194,7 +197,7 @@ jobs:
uses: docker/metadata-action@v4
with:
tags: |
type=semver,event=tag,pattern={{version}}
type=raw,enable=true,priority=200,prefix=,suffix=,value=${{ github.event.inputs.version }}
flavor: |
latest=true
images: |
Expand Down Expand Up @@ -231,41 +234,3 @@ jobs:
username: flowfuse
password: ${{ secrets.DOCKER_HUB_PASSWORD_FLOWFUSE }}
readme-filepath: ./helm/file-server/README.md

publish_helm:
needs: [build_application_container, build_nodered_container, build_nodered_container_223, build_file_server_container]
runs-on: ubuntu-latest
steps:
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.5.2
- name: Install Deps
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Checkout
uses: actions/checkout@v3
with:
repository: 'flowfuse/helm'
fetch-depth: 0
path: 'helm'
- name: Package
run: |
helm package -d . helm/helm/flowforge
cd helm
git checkout gh-pages
mv ../flowforge-*.tgz .
helm repo index --url https://flowfuse.github.io/helm .
git add .
git -c user.name='FlowFuse Build Bot' -c user.email='noreply@flowfuse.com' commit -m "Add ${{ github.ref_name }} helm chart"
git push origin
- name: Resync Maintenance
if: ${{ endsWith(github.ref, '.0') }}
run: |
cd helm
git checkout maintenance
git reset --hard origin/main
git push --force origin maintenance

0 comments on commit 3fb98dd

Please sign in to comment.