2022-06-27 13:13:33 +02:00
|
|
|
name: Deploy Budibase Single Container Image to DockerHub
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "omnibus-action"
|
|
|
|
- "develop"
|
|
|
|
- "master"
|
|
|
|
- "main"
|
2022-06-27 14:43:54 +02:00
|
|
|
env:
|
|
|
|
BASE_BRANCH: ${{ github.event.pull_request.base.ref}}
|
|
|
|
BRANCH: ${{ github.event.pull_request.head.ref }}
|
2022-06-27 15:37:46 +02:00
|
|
|
CI: true
|
2022-06-27 14:43:54 +02:00
|
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
|
|
|
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
|
|
|
REGISTRY_URL: registry.hub.docker.com
|
2022-06-27 13:13:33 +02: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 }}
|
|
|
|
- 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
|
2022-06-27 15:37:46 +02:00
|
|
|
- name: Yarn Test
|
|
|
|
run: yarn test
|
2022-06-27 13:13:33 +02:00
|
|
|
- name: Test Code Coverage
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
|
|
|
|
files: ./packages/server/coverage/clover.xml
|
|
|
|
name: codecov-umbrella
|
|
|
|
verbose: true
|
|
|
|
- name: Test with Cypress
|
|
|
|
uses: cypress-io/github-action@v2
|
|
|
|
with:
|
|
|
|
install: false
|
|
|
|
command: yarn test:e2e:ci
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
run: |
|
|
|
|
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
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
|
|
|
|
- name: Tag and release Proxy service docker image
|
|
|
|
run: |
|
|
|
|
yarn build:docker:single:image
|
2022-06-27 14:43:54 +02:00
|
|
|
docker tag budibase budibase/single:$RELEASE_TAG
|
|
|
|
docker push budibase/single:$RELEASE_TAG
|