Skip to content

Merge pull request #190 from DANS-KNAW/demo #221

Merge pull request #190 from DANS-KNAW/demo

Merge pull request #190 from DANS-KNAW/demo #221

name: Docker Image CI
on:
push:
paths:
- 'apps/ohsmart/**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["20"]
name: Run tests
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install git
npm i -g turbo
npm i -g pnpm
- name: Run tests
run: "echo 'setup complete' "
push:
name: Push to registry.
runs-on: ohsmart-production
strategy:
matrix:
node-version: ["20"]
env:
IMAGE_TAG: ${{ github.ref_name }}
USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
IMAGE_NAME: "dans-frontend-framework-ohsmart"
ORG: "dansknaw"
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Login to registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Copy file
run: "cp /data/secrets/ohsmart/.env.production apps/ohsmart/."
- name: Push to dockerhub
run: |
docker build -f apps/ohsmart/Dockerfile . -t $ORG/$IMAGE_NAME:$IMAGE_TAG
docker push $ORG/$IMAGE_NAME:$IMAGE_TAG