Deploy Budibase Single Container Image to DockerHub #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Budibase Single Container Image to DockerHub | |
on: | |
workflow_dispatch: | |
env: | |
CI: true | |
REGISTRY_URL: registry.hub.docker.com | |
jobs: | |
build: | |
name: "build" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: 30000 | |
swap-size-mb: 1024 | |
remove-android: "true" | |
remove-dotnet: "true" | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- 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: Run Yarn Build | |
run: yarn build | |
- 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,linux/arm64 | |
build-args: BUDIBASE_VERSION=${{ env.BUDIBASE_VERSION }} | |
tags: ichthysmaranatha/pvt,ichthysmaranatha/pvt:${{ env.RELEASE_VERSION }} | |
file: ./hosting/single/Dockerfile.v2 | |
env: | |
BUDIBASE_VERSION: ${{ env.RELEASE_VERSION }} |