Use zen configuration for aidbox #149
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: github-actions | |
on: [push, pull_request] | |
env: | |
BUILD_IMAGE: bedasoftware/fhir-sdc | |
CACHE_IMAGE: bedasoftware/fhir-sdc:latest | |
TESTS_AIDBOX_LICENSE: ${{ secrets.TESTS_AIDBOX_LICENSE }} | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: docker pull ${{ env.CACHE_IMAGE }} || true | |
- run: >- | |
docker build --cache-from ${{ env.CACHE_IMAGE }} | |
--tag ${{ env.BUILD_IMAGE }} . | |
- name: Run tests | |
run: ./run_test.sh | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT | |
id: extract_branch | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- run: docker run --rm --privileged tonistiigi/binfmt --install all | |
- run: >- | |
docker buildx build --platform linux/arm64,linux/amd64 | |
--cache-from ${{ env.CACHE_IMAGE }} --push | |
--tag ${{ env.BUILD_IMAGE }}:${{ steps.extract_branch.outputs.branch }} --tag ${{ env.CACHE_IMAGE }} . |