Skip to content

Release Flex

Release Flex #1

Workflow file for this run

name: Release Flex
on:
workflow_dispatch:
inputs:
version:
description: 'Version of Flex'
required: true
manifest:
description: 'URL of Manifest'
required: true
release_number_bump:
description: 'I have updated system.clj release number!'
required: true
default: 'false'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check that we have bumped release number
run: |
./scripts/release_number_check.sh ${{github.event.inputs.release_number_bump}}
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Download and verify JAR(s)
run: |
./scripts/jar.sh "${{github.event.inputs.manifest}}"
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Log into GitHub packages
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Flex (SE)
run: |
VERSION=${{github.event.inputs.version}}
IMAGE_ID=factorhouse/flex-se
IMAGE_TAG=$VERSION
./scripts/build_all.sh $VERSION $IMAGE_ID $IMAGE_TAG dockerfile/flex/Dockerfile
- name: Build Flex (latest) (SE)
run: |
VERSION=${{github.event.inputs.version}}
IMAGE_ID=factorhouse/flex-se
IMAGE_TAG=latest
./scripts/build_all.sh $VERSION $IMAGE_ID $IMAGE_TAG dockerfile/flex/Dockerfile
- name: Build Flex (SE)
run: |
VERSION=${{github.event.inputs.version}}
IMAGE_ID=factorhouse/flex-ee
IMAGE_TAG=$VERSION
./scripts/build_all.sh $VERSION $IMAGE_ID $IMAGE_TAG dockerfile/flex/Dockerfile
- name: Build Flex (latest) (SE)
run: |
VERSION=${{github.event.inputs.version}}
IMAGE_ID=factorhouse/flex-ee
IMAGE_TAG=latest
./scripts/build_all.sh $VERSION $IMAGE_ID $IMAGE_TAG dockerfile/flex/Dockerfile
- name: Install babashka
run: sudo bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
- name: Update releases-flex-ee.edn
run: ./scripts/release.clj ${{github.event.inputs.version}} releases-flex-ee.edn
# - name: Update dockerhub/flex-ee/README.md
# run: echo ${{github.event.inputs.version}} | ./scripts/dockerhub_readme_ee.clj
# - name: Update dockerhub/flex-se/README.md
# run: echo ${{github.event.inputs.version}} | ./scripts/dockerhub_readme_se.clj
- name: Commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "Flex CI"
git commit -am "Release Enterprise ${{github.event.inputs.version}}"
- name: Tag
run: git tag -a ee/${{github.event.inputs.version}} -m "Release Enterprise ${{github.event.inputs.version}}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}