2023-10-02 16:08:41 +02:00
|
|
|
name: Test
|
2022-07-14 19:50:09 +02:00
|
|
|
|
2022-06-27 13:13:33 +02:00
|
|
|
on:
|
2023-10-13 14:35:13 +02:00
|
|
|
workflow_dispatch:
|
2022-07-14 19:50:09 +02:00
|
|
|
|
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
|
2023-10-06 13:36:41 +02:00
|
|
|
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
2022-06-27 13:13:33 +02:00
|
|
|
jobs:
|
2023-08-08 18:39:51 +02:00
|
|
|
build:
|
|
|
|
name: "build"
|
2022-06-27 13:13:33 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-07-28 17:53:11 +02:00
|
|
|
node-version: [18.x]
|
2022-06-27 13:13:33 +02:00
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
2023-10-03 00:46:00 +02:00
|
|
|
uses: actions/checkout@v4
|
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-08-08 18:39:51 +02:00
|
|
|
|
2023-07-26 13:36:55 +02:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2023-10-03 00:46:00 +02:00
|
|
|
uses: actions/setup-node@v3
|
2023-07-26 13:36:55 +02:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2023-10-06 11:52:54 +02:00
|
|
|
cache: "yarn"
|
2023-07-26 13:36:55 +02:00
|
|
|
- name: Setup QEMU
|
2023-10-03 00:46:00 +02:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2023-10-13 14:35:13 +02:00
|
|
|
- name: Setup Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-07-26 13:36:55 +02:00
|
|
|
- name: Run Yarn
|
|
|
|
run: yarn
|
|
|
|
- name: Run Yarn Build
|
2023-10-06 14:32:17 +02:00
|
|
|
run: yarn build --scope @budibase/server --scope @budibase/worker
|
2023-10-02 23:48:45 +02:00
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_API_KEY }}
|
2023-07-26 13:36:55 +02:00
|
|
|
- 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
|
2023-10-02 16:36:10 +02:00
|
|
|
uses: docker/build-push-action@v5
|
2023-07-26 13:36:55 +02:00
|
|
|
with:
|
|
|
|
context: .
|
2023-10-02 20:27:24 +02:00
|
|
|
push: true
|
2023-10-04 20:29:36 +02:00
|
|
|
pull: true
|
2023-10-13 14:09:17 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2023-10-23 13:53:18 +02:00
|
|
|
build-args: BUDIBASE_VERSION=0.0.0+test
|
2023-10-02 23:50:43 +02:00
|
|
|
tags: budibase/budibase-test:test
|
2023-10-13 12:58:07 +02:00
|
|
|
file: ./hosting/single/Dockerfile.v2
|
2023-10-02 23:50:43 +02:00
|
|
|
cache-from: type=registry,ref=budibase/budibase-test:test
|
2023-10-02 18:14:15 +02:00
|
|
|
cache-to: type=inline
|
2023-10-13 14:09:17 +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
|
2023-10-20 17:27:42 +02:00
|
|
|
build-args: |
|
|
|
|
TARGETBUILD=aas
|
2023-10-23 13:53:18 +02:00
|
|
|
BUDIBASE_VERSION=0.0.0+test
|
2023-10-13 14:09:17 +02:00
|
|
|
tags: budibase/budibase-test:aas
|
|
|
|
file: ./hosting/single/Dockerfile.v2
|