2023-07-26 13:36:55 +02:00
|
|
|
name: release-singleimage
|
2022-07-14 19:50:09 +02:00
|
|
|
|
2022-06-27 13:13:33 +02:00
|
|
|
on:
|
2022-07-14 19:50:09 +02:00
|
|
|
workflow_dispatch:
|
|
|
|
|
2022-06-27 14:43:54 +02:00
|
|
|
env:
|
2022-06-27 15:37:46 +02:00
|
|
|
CI: true
|
2023-06-07 14:54:54 +02:00
|
|
|
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
2022-06-27 14:43:54 +02:00
|
|
|
REGISTRY_URL: registry.hub.docker.com
|
2022-06-27 13:13:33 +02:00
|
|
|
jobs:
|
2023-07-26 13:36:55 +02:00
|
|
|
build-amd64:
|
|
|
|
name: "build-amd64"
|
2022-06-27 13:13:33 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-07-28 17:52:24 +02:00
|
|
|
node-version: [14.x]
|
2022-06-27 13:13:33 +02:00
|
|
|
steps:
|
2023-06-06 12:12:29 +02:00
|
|
|
- name: Fail if not a tag
|
|
|
|
run: |
|
|
|
|
if [[ $GITHUB_REF != refs/tags/* ]]; then
|
|
|
|
echo "Workflow Dispatch can only be run on tags"
|
|
|
|
exit 1
|
|
|
|
fi
|
2022-06-27 13:13:33 +02:00
|
|
|
- name: "Checkout"
|
|
|
|
uses: actions/checkout@v2
|
2023-06-06 12:12:29 +02:00
|
|
|
with:
|
2023-06-07 14:56:35 +02:00
|
|
|
submodules: true
|
|
|
|
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
2023-06-06 12:12:29 +02:00
|
|
|
fetch-depth: 0
|
|
|
|
- name: Fail if tag is not in master
|
|
|
|
run: |
|
|
|
|
if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
|
|
|
|
echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
|
|
|
|
exit 1
|
|
|
|
fi
|
2023-07-26 13:36:55 +02:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Setup QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Setup Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Run Yarn
|
|
|
|
run: yarn
|
|
|
|
- name: Update versions
|
|
|
|
run: ./scripts/updateVersions.sh
|
|
|
|
- name: Runt Yarn Lint
|
|
|
|
run: yarn lint
|
|
|
|
- name: Update versions
|
|
|
|
run: ./scripts/updateVersions.sh
|
|
|
|
- name: Run Yarn Build
|
|
|
|
run: yarn build:docker:pre
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_API_KEY }}
|
|
|
|
- name: Get the latest release version
|
|
|
|
id: version
|
|
|
|
run: |
|
|
|
|
release_version=$(cat lerna.json | jq -r '.version')
|
|
|
|
echo $release_version
|
|
|
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
|
|
|
- name: Tag and release Budibase service docker image
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
platforms: linux/amd64
|
|
|
|
tags: budibase/budibase,budibase/budibase:v${{ env.RELEASE_VERSION }}
|
|
|
|
file: ./hosting/single/Dockerfile
|
|
|
|
|
|
|
|
- name: Tag and release Budibase Azure App Service docker image
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
platforms: linux/amd64
|
|
|
|
build-args: TARGETBUILD=aas
|
|
|
|
tags: budibase/budibase-aas,budibase/budibase-aas:v${{ env.RELEASE_VERSION }}
|
|
|
|
file: ./hosting/single/Dockerfile
|
2023-06-07 14:54:54 +02:00
|
|
|
|
2023-07-26 13:36:55 +02:00
|
|
|
build-arm64:
|
|
|
|
name: "build-arm64"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14.x]
|
|
|
|
steps:
|
|
|
|
- name: Fail if not a tag
|
|
|
|
run: |
|
|
|
|
if [[ $GITHUB_REF != refs/tags/* ]]; then
|
|
|
|
echo "Workflow Dispatch can only be run on tags"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
- name: "Checkout"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Fail if tag is not in master
|
|
|
|
run: |
|
|
|
|
if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
|
|
|
|
echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
|
|
|
|
exit 1
|
|
|
|
fi
|
2022-06-27 13:13:33 +02:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2022-07-06 17:53:25 +02:00
|
|
|
- name: Setup QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Setup Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
2022-06-27 13:13:33 +02:00
|
|
|
- name: Run Yarn
|
|
|
|
run: yarn
|
2023-06-07 14:54:54 +02:00
|
|
|
- name: Update versions
|
2023-06-07 18:18:59 +02:00
|
|
|
run: ./scripts/updateVersions.sh
|
2022-06-27 13:13:33 +02:00
|
|
|
- name: Runt Yarn Lint
|
|
|
|
run: yarn lint
|
2023-06-07 14:54:54 +02:00
|
|
|
- name: Update versions
|
2023-06-07 18:18:59 +02:00
|
|
|
run: ./scripts/updateVersions.sh
|
2022-06-27 13:13:33 +02:00
|
|
|
- name: Run Yarn Build
|
2022-07-13 17:39:38 +02:00
|
|
|
run: yarn build:docker:pre
|
2022-06-27 13:13:33 +02:00
|
|
|
- name: Login to Docker Hub
|
2022-07-07 17:38:48 +02:00
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_API_KEY }}
|
2022-06-27 14:43:54 +02:00
|
|
|
- name: Get the latest release version
|
2022-06-27 13:13:33 +02:00
|
|
|
id: version
|
|
|
|
run: |
|
|
|
|
release_version=$(cat lerna.json | jq -r '.version')
|
2022-06-27 14:43:54 +02:00
|
|
|
echo $release_version
|
2022-06-27 13:13:33 +02:00
|
|
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
2022-07-05 20:56:47 +02:00
|
|
|
- name: Tag and release Budibase service docker image
|
2022-07-06 17:53:25 +02:00
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
2022-07-07 15:32:48 +02:00
|
|
|
push: true
|
2023-07-26 13:36:55 +02:00
|
|
|
platforms: linux/arm64
|
|
|
|
tags: budibase/budibase,budibase/budibase:v${{ env.RELEASE_VERSION }}
|
2022-07-06 17:53:25 +02:00
|
|
|
file: ./hosting/single/Dockerfile
|
2023-07-26 13:36:55 +02:00
|
|
|
|
|
|
|
build-aas:
|
|
|
|
name: "build-aas"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14.x]
|
|
|
|
steps:
|
|
|
|
- name: Fail if not a tag
|
|
|
|
run: |
|
|
|
|
if [[ $GITHUB_REF != refs/tags/* ]]; then
|
|
|
|
echo "Workflow Dispatch can only be run on tags"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
- name: "Checkout"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Fail if tag is not in master
|
|
|
|
run: |
|
|
|
|
if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
|
|
|
|
echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Setup QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Setup Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Run Yarn
|
|
|
|
run: yarn
|
|
|
|
- name: Update versions
|
|
|
|
run: ./scripts/updateVersions.sh
|
|
|
|
- name: Runt Yarn Lint
|
|
|
|
run: yarn lint
|
|
|
|
- name: Update versions
|
|
|
|
run: ./scripts/updateVersions.sh
|
|
|
|
- name: Run Yarn Build
|
|
|
|
run: yarn build:docker:pre
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_API_KEY }}
|
|
|
|
- name: Get the latest release version
|
|
|
|
id: version
|
|
|
|
run: |
|
|
|
|
release_version=$(cat lerna.json | jq -r '.version')
|
|
|
|
echo $release_version
|
|
|
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
2022-07-18 11:36:42 +02:00
|
|
|
- name: Tag and release Budibase Azure App Service docker image
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
platforms: linux/amd64
|
|
|
|
build-args: TARGETBUILD=aas
|
2023-07-17 22:48:02 +02:00
|
|
|
tags: budibase/budibase-aas,budibase/budibase-aas:${{ env.RELEASE_VERSION }}
|
2022-07-18 11:36:42 +02:00
|
|
|
file: ./hosting/single/Dockerfile
|