1
0
Fork 0
mirror of synced 2024-07-01 20:41:03 +12:00
budibase/.github/workflows/deploy-single-image.yml

69 lines
2.2 KiB
YAML
Raw Normal View History

2022-06-27 23:13:33 +12:00
name: Deploy Budibase Single Container Image to DockerHub
2022-06-27 23:13:33 +12:00
on:
workflow_dispatch:
2022-06-28 00:43:54 +12:00
env:
BASE_BRANCH: ${{ github.event.pull_request.base.ref}}
BRANCH: ${{ github.event.pull_request.head.ref }}
2022-06-28 01:37:46 +12:00
CI: true
2022-06-28 00:43:54 +12:00
PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
REGISTRY_URL: registry.hub.docker.com
2022-06-27 23:13:33 +12:00
jobs:
build:
name: "build"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
2022-07-07 03:53:25 +12: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 23:13:33 +12:00
- name: Install Pro
run: yarn install:pro $BRANCH $BASE_BRANCH
- name: Run Yarn
run: yarn
- name: Run Yarn Bootstrap
run: yarn bootstrap
- name: Runt Yarn Lint
run: yarn lint
- name: Run Yarn Build
run: yarn build:docker:pre
2022-06-27 23:13:33 +12:00
- name: Login to Docker Hub
2022-07-08 03:38:48 +12:00
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_API_KEY }}
2022-06-28 00:43:54 +12:00
- name: Get the latest release version
2022-06-27 23:13:33 +12:00
id: version
run: |
release_version=$(cat lerna.json | jq -r '.version')
2022-06-28 00:43:54 +12:00
echo $release_version
2022-06-27 23:13:33 +12:00
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
2022-07-06 06:56:47 +12:00
- name: Tag and release Budibase service docker image
2022-07-07 03:53:25 +12:00
uses: docker/build-push-action@v2
with:
context: .
2022-07-08 01:32:48 +12:00
push: true
2022-07-07 03:53:25 +12:00
platforms: linux/amd64,linux/arm64
tags: budibase/budibase,budibase/budibase:v${{ env.RELEASE_VERSION }}
2022-07-07 03:53:25 +12:00
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