Skip to content
Snippets Groups Projects
Unverified Commit bad01b82 authored by Luis Paolini's avatar Luis Paolini Committed by GitHub
Browse files

Build and publish branches (#19562)


* Build and publish branches

* fixup whitespace

* Update docker.yml

Co-authored-by: default avatarKyle Doherty <5248953+kdoh@users.noreply.github.com>
parent c390bb02
No related branches found
No related tags found
No related merge requests found
name: Docker
on:
pull_request:
paths:
- 'Dockerfile'
- '.github/workflows/docker.yml'
push:
branches-ignore:
- 'master'
- 'release**'
- 'backport**'
paths-ignore:
- ".**"
jobs:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: buildjet-2vcpu-ubuntu-2004
timeout-minutes: 40
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build container image
run: docker build -t test-container-image .
run: docker buildx build . -t metabase/metabase-dev:${{ steps.extract_branch.outputs.branch }} --push --compress --no-cache
- name: Launch container
run: docker run -dp 3000:3000 test-container-image
run: docker run -dp 3000:3000 metabase/metabase-dev:${{ steps.extract_branch.outputs.branch }}
timeout-minutes: 5
- run: docker ps
- name: Wait for Metabase to start
run: while ! curl -s localhost:3000/api/health; do sleep 1; done
run: while ! curl -s 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
timeout-minutes: 1
- name: Check API health
run: curl -s localhost:3000/api/health
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment