Add version support release-selfhost.yml
This commit is contained in:
parent
2165d3c46a
commit
07a1cf63a1
|
@ -2,6 +2,10 @@ name: Budibase Release Selfhost
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: Budibase release version. For example - 1.0.0
|
||||||
|
required: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BRANCH: ${{ github.event.pull_request.head.ref }}
|
BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||||
|
@ -12,19 +16,32 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Fail if branch is not master
|
||||||
|
if: github.ref != 'refs/heads/master'
|
||||||
|
run: |
|
||||||
|
echo "Ref is not master, you must run this job from master."
|
||||||
|
exit 1
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
node-version: 14.x
|
node-version: 14.x
|
||||||
fetch_depth: 0
|
fetch_depth: 0
|
||||||
|
|
||||||
|
- name: Get the latest budibase release version
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
if [ -z "${{ github.event.inputs.version }}" ]; then
|
||||||
|
release_version=$(cat lerna.json | jq -r '.version')
|
||||||
|
else
|
||||||
|
release_version=${{ github.event.inputs.version }}
|
||||||
|
fi
|
||||||
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Tag and release Docker images (Self Host)
|
- name: Tag and release Docker images (Self Host)
|
||||||
run: |
|
run: |
|
||||||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
||||||
|
|
||||||
# Get latest release version
|
release_tag=v${{ env.RELEASE_VERSION }}
|
||||||
release_version=$(cat lerna.json | jq -r '.version')
|
|
||||||
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
|
||||||
release_tag=v$release_version
|
|
||||||
|
|
||||||
# Pull apps and worker images
|
# Pull apps and worker images
|
||||||
docker pull budibase/apps:$release_tag
|
docker pull budibase/apps:$release_tag
|
||||||
|
|
Loading…
Reference in New Issue