Skip to content

Fix property name

Fix property name #246

Workflow file for this run

name: Develop
on:
push:
branches:
- develop
env:
DOCKER_BUILDKIT: 1
IMAGE_TAG: ${{ github.sha }}
REGISTRY_USERNAME: prereview
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: 'Checkout code'
uses: actions/checkout@v2
- name: 'Create Git LFS lockfile'
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: 'Set up Git LFS cache'
uses: actions/cache@v2
with:
path: .git/lfs
key: lfs-${{ hashFiles('.lfs-assets-id') }}
- name: 'Git LFS pull'
run: git lfs pull
- name: 'Build dev image'
run: make build
env:
TARGET: 'dev'
- name: 'Typecheck'
run: make typecheck
continue-on-error: true
- name: 'Lint'
run: make lint
- name: 'Test'
run: make test
- name: 'Format'
run: make format
continue-on-error: true
- name: 'Build image'
run: make build
env:
TARGET: 'prod'
- name: 'Smoke test'
run: make smoke-test
- name: 'Build integration test image'
run: make build
env:
TARGET: 'integration'
- name: 'Run integration tests'
id: integration-test
run: make integration-test
continue-on-error: true
env:
PREREVIEW_ORCID_CLIENT_ID: ${{ secrets.ORCID_SANDBOX_CLIENT_ID }}
PREREVIEW_ORCID_CLIENT_SECRET: ${{ secrets.ORCID_SANDBOX_CLIENT_SECRET }}
PREREVIEW_ZENODO_TOKEN: ${{ secrets.ZENODO_TOKEN }}
- name: 'Store integration test results'
if: ${{ failure() && steps.integration-test.outcome == 'failure' }}
uses: actions/upload-artifact@v2
with:
name: integration-tests-results
path: integration/results
- name: 'Check migrations'
run: |
make create-migration
git ls-files --others --exclude-standard -z | xargs --no-run-if-empty -0 -n 1 git --no-pager diff /dev/null
- name: 'Log in to registry'
uses: azure/docker-login@v1
with:
login-server: prereview.azurecr.io
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: 'Push image'
run: docker push prereview.azurecr.io/prereview:${{ env.IMAGE_TAG }}
deploy:
runs-on: ubuntu-20.04
needs: build
steps:
- name: 'Checkout code'
uses: actions/checkout@v2
- name: 'Log in to Azure'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Deploy app'
uses: azure/webapps-deploy@v2
with:
app-name: 'prereview-dev'
images: prereview.azurecr.io/prereview:${{ env.IMAGE_TAG }}
configuration-file: './deploy/docker-compose-dev.yml'
tag:
runs-on: ubuntu-20.04
needs: deploy
continue-on-error: true
steps:
- name: 'Tag as develop'
uses: tinact/[email protected]
with:
image_name: 'prereview'
image_old_tag: ${{ env.IMAGE_TAG }}
image_new_tag: 'develop'
registry: 'prereview.azurecr.io'
registry_username: ${{ env.REGISTRY_USERNAME }}
registry_password: ${{ secrets.REGISTRY_PASSWORD }}