add container image build #9
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# GitHub recommends pinning actions to a commit SHA. | |
# To get a newer version, you will need to update the SHA. | |
# You can also reference a tag or branch, but the action may change without warning. | |
name: Build and Test Images | |
#on: | |
# pull_request: | |
on: | |
push: | |
branches: | |
- '**' | |
env: | |
CONTAINER_REGISTRY: ${{ vars.CONTAINER_REGISTRY }} | |
CONTAINER_REGISTRY_USERNAME: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} | |
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_ACCESS_TOKEN }} | |
jobs: | |
build-and-test-image: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Update submodules | |
run: git submodule update --init --recursive | |
- name: Login to ACR | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.CONTAINER_REGISTRY }} | |
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} | |
password: ${{ secrets.CONTAINER_REGISTRY_ACCESS_TOKEN }} | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.19.x' | |
- name: Install jq | |
run: sudo apt install -y jq | |
- name: Install make | |
run: sudo apt install make | |
- name: Install wheel | |
run: pip install wheel | |
- name: Build encrypted filesystem artifacta, contract ledger client & depa-training container | |
run: cd ${{ github.workspace }} && .ci/build.sh | |
- name: Build container images | |
run: cd ${{ github.workspace }}/scenarios/covid && ./ci/build.sh | |
- name: Run pre-processing | |
run: cd ./scenarios/covid/deployment/docker && ./preprocess.sh | |
- name: Run model saving | |
run: cd ./scenarios/covid/deployment/docker && ./save-model.sh | |
- name: Run training | |
run: cd ./scenarios/covid/deployment/docker && ./train.sh | |