Merge pull request #48 from DSInnovators/version-55 #85
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: Build and push released images | |
on: | |
push: | |
branches: [ "staging" ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
edition: [oss] | |
env: | |
MB_EDITION: ${{ matrix.edition }} | |
INTERACTIVE: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- name: Prepare JDK 8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
- name: Install gettext | |
run: sudo apt install gettext | |
- name: Install Clojure CLI | |
run: | | |
curl -O https://download.clojure.org/install/linux-install-1.10.1.708.sh && | |
sudo bash ./linux-install-1.10.1.708.sh | |
- name: Check versions | |
run: | | |
echo "Node.js `node --version`" | |
echo "yarn `yarn --version`" | |
java -version | |
echo "Clojure `clojure -e "(println (clojure-version))"`" | |
lein --version | |
msgfmt --version | |
- name: Get yarn cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Get M2 cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/project.clj') }}-${{ hashFiles('**/deps.edn') }} | |
- run: yarn install --lockfile | |
- name: Build "metabase.jar" | |
run: ./bin/build | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Push docker image | |
run: sh deploy.sh `cat version.json | jq -r '.version'` |