diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index cd71beb9..6fbad85d 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -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: @@ -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: | @@ -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: | @@ -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: | @@ -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: | @@ -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: | @@ -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 - - -